fixes before build
This commit is contained in:
@@ -7,6 +7,7 @@ class ShoppingList {
|
||||
required this.name,
|
||||
required this.itemCount,
|
||||
required this.checkedCount,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
@@ -14,6 +15,7 @@ class ShoppingList {
|
||||
final String name;
|
||||
final int itemCount;
|
||||
final int checkedCount;
|
||||
final DateTime createdAt;
|
||||
final DateTime updatedAt;
|
||||
|
||||
factory ShoppingList.fromMap(Map<String, Object?> map) {
|
||||
@@ -22,6 +24,9 @@ class ShoppingList {
|
||||
name: map['name']! as String,
|
||||
itemCount: (map['item_count'] as num?)?.toInt() ?? 0,
|
||||
checkedCount: (map['checked_count'] as num?)?.toInt() ?? 0,
|
||||
createdAt: DateTime.parse(
|
||||
(map['created_at'] ?? map['updated_at'])! as String,
|
||||
),
|
||||
updatedAt: DateTime.parse(map['updated_at']! as String),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user