This commit is contained in:
Tobe O 2019-04-26 09:50:07 -04:00
parent d663c99582
commit 308cd94c78
3 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,6 @@
# 1.0.3
* `idAsInt` returns `null` when `id` is `null`.
# 1.0.2
* `idAsInt` now uses `int.tryParse`.

View file

@ -12,5 +12,5 @@ class Model {
Model({this.id, this.createdAt, this.updatedAt});
/// Returns the [id], parsed as an [int].
int get idAsInt => int.tryParse(id);
int get idAsInt => id == null ? null : int.tryParse(id);
}

View file

@ -1,5 +1,5 @@
name: angel_model
version: 1.0.2
version: 1.0.3
description: Angel's basic data model class, no longer with the added weight of the whole framework.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/model