fixes before build
This commit is contained in:
@@ -9,12 +9,14 @@ class Supermarket {
|
||||
required this.name,
|
||||
required this.colorValue,
|
||||
this.sortOrder = 0,
|
||||
this.bonusImagePath,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String name;
|
||||
final int colorValue;
|
||||
final int sortOrder;
|
||||
final String? bonusImagePath;
|
||||
|
||||
Color get color => Color(colorValue);
|
||||
|
||||
@@ -24,6 +26,7 @@ class Supermarket {
|
||||
name: map['name']! as String,
|
||||
colorValue: map['color']! as int,
|
||||
sortOrder: map['sort_order'] as int? ?? 0,
|
||||
bonusImagePath: map['bonus_image_path'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,12 +35,17 @@ class Supermarket {
|
||||
String? name,
|
||||
int? colorValue,
|
||||
int? sortOrder,
|
||||
String? bonusImagePath,
|
||||
bool clearBonusImage = false,
|
||||
}) {
|
||||
return Supermarket(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
colorValue: colorValue ?? this.colorValue,
|
||||
sortOrder: sortOrder ?? this.sortOrder,
|
||||
bonusImagePath: clearBonusImage
|
||||
? null
|
||||
: (bonusImagePath ?? this.bonusImagePath),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user