1.0.3
This commit is contained in:
parent
d663c99582
commit
308cd94c78
3 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
# 1.0.3
|
||||||
|
* `idAsInt` returns `null` when `id` is `null`.
|
||||||
|
|
||||||
# 1.0.2
|
# 1.0.2
|
||||||
* `idAsInt` now uses `int.tryParse`.
|
* `idAsInt` now uses `int.tryParse`.
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,5 @@ class Model {
|
||||||
Model({this.id, this.createdAt, this.updatedAt});
|
Model({this.id, this.createdAt, this.updatedAt});
|
||||||
|
|
||||||
/// Returns the [id], parsed as an [int].
|
/// Returns the [id], parsed as an [int].
|
||||||
int get idAsInt => int.tryParse(id);
|
int get idAsInt => id == null ? null : int.tryParse(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_model
|
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.
|
description: Angel's basic data model class, no longer with the added weight of the whole framework.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/model
|
homepage: https://github.com/angel-dart/model
|
||||||
|
|
Loading…
Reference in a new issue