mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 11:33:34 +08:00
Note: Remove the asserts
We actually do quite often create notes without anything, and then later fill them up. Lets just setup a bad default for the created.
This commit is contained in:
@ -12,10 +12,9 @@ class Note implements Comparable {
|
|||||||
Map<String, dynamic> extraProperties = new Map<String, dynamic>();
|
Map<String, dynamic> extraProperties = new Map<String, dynamic>();
|
||||||
|
|
||||||
Note({this.created, this.body, this.fileName, this.extraProperties}) {
|
Note({this.created, this.body, this.fileName, this.extraProperties}) {
|
||||||
assert(this.created != null);
|
if (created == null) {
|
||||||
assert(this.body != null);
|
created = DateTime(0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
assert(this.fileName != null);
|
}
|
||||||
|
|
||||||
if (extraProperties == null) {
|
if (extraProperties == null) {
|
||||||
extraProperties = new Map<String, dynamic>();
|
extraProperties = new Map<String, dynamic>();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user