Add Factory Method for Empty Tag Instance in Tag Model.

This commit is contained in:
Faris Armoush
2025-07-07 14:25:37 +03:00
parent e523a83912
commit dc7064d142

View File

@ -13,6 +13,13 @@ class Tag extends Equatable {
required this.updatedAt, required this.updatedAt,
}); });
factory Tag.empty() => const Tag(
uuid: '',
name: '',
createdAt: '',
updatedAt: '',
);
factory Tag.fromJson(Map<String, dynamic> json) { factory Tag.fromJson(Map<String, dynamic> json) {
return Tag( return Tag(
uuid: json['uuid'] as String, uuid: json['uuid'] as String,