Major refactoring for model data accessors

This commit is contained in:
Oliver Walters 2023-04-21 20:25:29 +10:00
parent bfb582efb2
commit bff2a5e2a9
7 changed files with 188 additions and 227 deletions

View file

@ -27,8 +27,8 @@ class InvenTreeNotification extends InvenTreeModel {
};
}
String get message => (jsondata["message"] ?? "") as String;
String get message => getString("message");
DateTime? get creationDate {
if (jsondata.containsKey("creation")) {
return DateTime.tryParse((jsondata["creation"] ?? "") as String);