feat: Add color and icon properties to categories, enhance category management in UI
This commit is contained in:
@@ -8,6 +8,8 @@ class Category {
|
||||
this.isDeleted = false,
|
||||
required this.updatedAt,
|
||||
this.isDirty = true,
|
||||
this.colorValue,
|
||||
this.iconCodePoint,
|
||||
}) : id = id ?? Uuid().v4();
|
||||
|
||||
final String id;
|
||||
@@ -16,6 +18,8 @@ class Category {
|
||||
final bool isDeleted;
|
||||
final DateTime updatedAt;
|
||||
final bool isDirty;
|
||||
final int? colorValue;
|
||||
final int? iconCodePoint;
|
||||
|
||||
Category copyWith({
|
||||
String? id,
|
||||
@@ -24,6 +28,8 @@ class Category {
|
||||
bool? isDeleted,
|
||||
DateTime? updatedAt,
|
||||
bool? isDirty,
|
||||
int? colorValue,
|
||||
int? iconCodePoint,
|
||||
}) {
|
||||
return Category(
|
||||
id: id ?? this.id,
|
||||
@@ -32,6 +38,8 @@ class Category {
|
||||
isDeleted: isDeleted ?? this.isDeleted,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
isDirty: isDirty ?? this.isDirty,
|
||||
colorValue: colorValue ?? this.colorValue,
|
||||
iconCodePoint: iconCodePoint ?? this.iconCodePoint,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user