feat: tags (#11980)

* feat: tags

* fix: folder tree icons

* navigate to tag from detail panel

* delete tag

* Tag position and add tag button

* Tag asset in detail panel

* refactor form

* feat: navigate to tag page from clicking on a tag

* feat: delete tags from the tag page

* refactor: moving tag section in detail panel and add + tag button

* feat: tag asset action in detail panel

* refactor add tag form

* fdisable add tag button when there is no selection

* feat: tag bulk endpoint

* feat: tag colors

* chore: clean up

* chore: unit tests

* feat: write tags to sidecar

* Remove tag and auto focus on tag creation form opened

* chore: regenerate migration

* chore: linting

* add color picker to tag edit form

* fix: force render tags timeline on navigating back from asset viewer

* feat: read tags from keywords

* chore: clean up

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen 2024-08-29 12:14:03 -04:00 committed by GitHub
parent 682adaa334
commit d08a20bd57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 3032 additions and 814 deletions

View file

@ -96,6 +96,7 @@ class Permission {
static const tagPeriodRead = Permission._(r'tag.read');
static const tagPeriodUpdate = Permission._(r'tag.update');
static const tagPeriodDelete = Permission._(r'tag.delete');
static const tagPeriodAsset = Permission._(r'tag.asset');
static const adminPeriodUserPeriodCreate = Permission._(r'admin.user.create');
static const adminPeriodUserPeriodRead = Permission._(r'admin.user.read');
static const adminPeriodUserPeriodUpdate = Permission._(r'admin.user.update');
@ -176,6 +177,7 @@ class Permission {
tagPeriodRead,
tagPeriodUpdate,
tagPeriodDelete,
tagPeriodAsset,
adminPeriodUserPeriodCreate,
adminPeriodUserPeriodRead,
adminPeriodUserPeriodUpdate,
@ -291,6 +293,7 @@ class PermissionTypeTransformer {
case r'tag.read': return Permission.tagPeriodRead;
case r'tag.update': return Permission.tagPeriodUpdate;
case r'tag.delete': return Permission.tagPeriodDelete;
case r'tag.asset': return Permission.tagPeriodAsset;
case r'admin.user.create': return Permission.adminPeriodUserPeriodCreate;
case r'admin.user.read': return Permission.adminPeriodUserPeriodRead;
case r'admin.user.update': return Permission.adminPeriodUserPeriodUpdate;

View file

@ -0,0 +1,110 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class TagBulkAssetsDto {
/// Returns a new [TagBulkAssetsDto] instance.
TagBulkAssetsDto({
this.assetIds = const [],
this.tagIds = const [],
});
List<String> assetIds;
List<String> tagIds;
@override
bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsDto &&
_deepEquality.equals(other.assetIds, assetIds) &&
_deepEquality.equals(other.tagIds, tagIds);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetIds.hashCode) +
(tagIds.hashCode);
@override
String toString() => 'TagBulkAssetsDto[assetIds=$assetIds, tagIds=$tagIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetIds'] = this.assetIds;
json[r'tagIds'] = this.tagIds;
return json;
}
/// Returns a new [TagBulkAssetsDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static TagBulkAssetsDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return TagBulkAssetsDto(
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
tagIds: json[r'tagIds'] is Iterable
? (json[r'tagIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<TagBulkAssetsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagBulkAssetsDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TagBulkAssetsDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, TagBulkAssetsDto> mapFromJson(dynamic json) {
final map = <String, TagBulkAssetsDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = TagBulkAssetsDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of TagBulkAssetsDto-objects as value to a dart map
static Map<String, List<TagBulkAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagBulkAssetsDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = TagBulkAssetsDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetIds',
'tagIds',
};
}

View file

@ -0,0 +1,98 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class TagBulkAssetsResponseDto {
/// Returns a new [TagBulkAssetsResponseDto] instance.
TagBulkAssetsResponseDto({
required this.count,
});
int count;
@override
bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsResponseDto &&
other.count == count;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(count.hashCode);
@override
String toString() => 'TagBulkAssetsResponseDto[count=$count]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'count'] = this.count;
return json;
}
/// Returns a new [TagBulkAssetsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static TagBulkAssetsResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return TagBulkAssetsResponseDto(
count: mapValueOfType<int>(json, r'count')!,
);
}
return null;
}
static List<TagBulkAssetsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagBulkAssetsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TagBulkAssetsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, TagBulkAssetsResponseDto> mapFromJson(dynamic json) {
final map = <String, TagBulkAssetsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = TagBulkAssetsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of TagBulkAssetsResponseDto-objects as value to a dart map
static Map<String, List<TagBulkAssetsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagBulkAssetsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = TagBulkAssetsResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'count',
};
}

View file

@ -10,10 +10,12 @@
part of openapi.api;
class UpdateTagDto {
/// Returns a new [UpdateTagDto] instance.
UpdateTagDto({
this.name,
class TagCreateDto {
/// Returns a new [TagCreateDto] instance.
TagCreateDto({
this.color,
required this.name,
this.parentId,
});
///
@ -22,49 +24,65 @@ class UpdateTagDto {
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? name;
String? color;
String name;
String? parentId;
@override
bool operator ==(Object other) => identical(this, other) || other is UpdateTagDto &&
other.name == name;
bool operator ==(Object other) => identical(this, other) || other is TagCreateDto &&
other.color == color &&
other.name == name &&
other.parentId == parentId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(name == null ? 0 : name!.hashCode);
(color == null ? 0 : color!.hashCode) +
(name.hashCode) +
(parentId == null ? 0 : parentId!.hashCode);
@override
String toString() => 'UpdateTagDto[name=$name]';
String toString() => 'TagCreateDto[color=$color, name=$name, parentId=$parentId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.name != null) {
json[r'name'] = this.name;
if (this.color != null) {
json[r'color'] = this.color;
} else {
// json[r'name'] = null;
// json[r'color'] = null;
}
json[r'name'] = this.name;
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
// json[r'parentId'] = null;
}
return json;
}
/// Returns a new [UpdateTagDto] instance and imports its values from
/// Returns a new [TagCreateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UpdateTagDto? fromJson(dynamic value) {
static TagCreateDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return UpdateTagDto(
name: mapValueOfType<String>(json, r'name'),
return TagCreateDto(
color: mapValueOfType<String>(json, r'color'),
name: mapValueOfType<String>(json, r'name')!,
parentId: mapValueOfType<String>(json, r'parentId'),
);
}
return null;
}
static List<UpdateTagDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateTagDto>[];
static List<TagCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagCreateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UpdateTagDto.fromJson(row);
final value = TagCreateDto.fromJson(row);
if (value != null) {
result.add(value);
}
@ -73,12 +91,12 @@ class UpdateTagDto {
return result.toList(growable: growable);
}
static Map<String, UpdateTagDto> mapFromJson(dynamic json) {
final map = <String, UpdateTagDto>{};
static Map<String, TagCreateDto> mapFromJson(dynamic json) {
final map = <String, TagCreateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateTagDto.fromJson(entry.value);
final value = TagCreateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@ -87,14 +105,14 @@ class UpdateTagDto {
return map;
}
// maps a json object with a list of UpdateTagDto-objects as value to a dart map
static Map<String, List<UpdateTagDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateTagDto>>{};
// maps a json object with a list of TagCreateDto-objects as value to a dart map
static Map<String, List<TagCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagCreateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = UpdateTagDto.listFromJson(entry.value, growable: growable,);
map[entry.key] = TagCreateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
@ -102,6 +120,7 @@ class UpdateTagDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'name',
};
}

View file

@ -13,44 +13,66 @@ part of openapi.api;
class TagResponseDto {
/// Returns a new [TagResponseDto] instance.
TagResponseDto({
this.color,
required this.createdAt,
required this.id,
required this.name,
required this.type,
required this.userId,
required this.updatedAt,
required this.value,
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? color;
DateTime createdAt;
String id;
String name;
TagTypeEnum type;
DateTime updatedAt;
String userId;
String value;
@override
bool operator ==(Object other) => identical(this, other) || other is TagResponseDto &&
other.color == color &&
other.createdAt == createdAt &&
other.id == id &&
other.name == name &&
other.type == type &&
other.userId == userId;
other.updatedAt == updatedAt &&
other.value == value;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(color == null ? 0 : color!.hashCode) +
(createdAt.hashCode) +
(id.hashCode) +
(name.hashCode) +
(type.hashCode) +
(userId.hashCode);
(updatedAt.hashCode) +
(value.hashCode);
@override
String toString() => 'TagResponseDto[id=$id, name=$name, type=$type, userId=$userId]';
String toString() => 'TagResponseDto[color=$color, createdAt=$createdAt, id=$id, name=$name, updatedAt=$updatedAt, value=$value]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.color != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'id'] = this.id;
json[r'name'] = this.name;
json[r'type'] = this.type;
json[r'userId'] = this.userId;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
json[r'value'] = this.value;
return json;
}
@ -62,10 +84,12 @@ class TagResponseDto {
final json = value.cast<String, dynamic>();
return TagResponseDto(
color: mapValueOfType<String>(json, r'color'),
createdAt: mapDateTime(json, r'createdAt', r'')!,
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
type: TagTypeEnum.fromJson(json[r'type'])!,
userId: mapValueOfType<String>(json, r'userId')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
value: mapValueOfType<String>(json, r'value')!,
);
}
return null;
@ -113,10 +137,11 @@ class TagResponseDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'createdAt',
'id',
'name',
'type',
'userId',
'updatedAt',
'value',
};
}

View file

@ -1,88 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class TagTypeEnum {
/// Instantiate a new enum with the provided [value].
const TagTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const OBJECT = TagTypeEnum._(r'OBJECT');
static const FACE = TagTypeEnum._(r'FACE');
static const CUSTOM = TagTypeEnum._(r'CUSTOM');
/// List of all possible values in this [enum][TagTypeEnum].
static const values = <TagTypeEnum>[
OBJECT,
FACE,
CUSTOM,
];
static TagTypeEnum? fromJson(dynamic value) => TagTypeEnumTypeTransformer().decode(value);
static List<TagTypeEnum> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TagTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [TagTypeEnum] to String,
/// and [decode] dynamic data back to [TagTypeEnum].
class TagTypeEnumTypeTransformer {
factory TagTypeEnumTypeTransformer() => _instance ??= const TagTypeEnumTypeTransformer._();
const TagTypeEnumTypeTransformer._();
String encode(TagTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a TagTypeEnum.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
TagTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'OBJECT': return TagTypeEnum.OBJECT;
case r'FACE': return TagTypeEnum.FACE;
case r'CUSTOM': return TagTypeEnum.CUSTOM;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [TagTypeEnumTypeTransformer] instance.
static TagTypeEnumTypeTransformer? _instance;
}

View file

@ -10,58 +10,55 @@
part of openapi.api;
class CreateTagDto {
/// Returns a new [CreateTagDto] instance.
CreateTagDto({
required this.name,
required this.type,
class TagUpdateDto {
/// Returns a new [TagUpdateDto] instance.
TagUpdateDto({
this.color,
});
String name;
TagTypeEnum type;
String? color;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateTagDto &&
other.name == name &&
other.type == type;
bool operator ==(Object other) => identical(this, other) || other is TagUpdateDto &&
other.color == color;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(name.hashCode) +
(type.hashCode);
(color == null ? 0 : color!.hashCode);
@override
String toString() => 'CreateTagDto[name=$name, type=$type]';
String toString() => 'TagUpdateDto[color=$color]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'name'] = this.name;
json[r'type'] = this.type;
if (this.color != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
}
return json;
}
/// Returns a new [CreateTagDto] instance and imports its values from
/// Returns a new [TagUpdateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateTagDto? fromJson(dynamic value) {
static TagUpdateDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return CreateTagDto(
name: mapValueOfType<String>(json, r'name')!,
type: TagTypeEnum.fromJson(json[r'type'])!,
return TagUpdateDto(
color: mapValueOfType<String>(json, r'color'),
);
}
return null;
}
static List<CreateTagDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateTagDto>[];
static List<TagUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagUpdateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CreateTagDto.fromJson(row);
final value = TagUpdateDto.fromJson(row);
if (value != null) {
result.add(value);
}
@ -70,12 +67,12 @@ class CreateTagDto {
return result.toList(growable: growable);
}
static Map<String, CreateTagDto> mapFromJson(dynamic json) {
final map = <String, CreateTagDto>{};
static Map<String, TagUpdateDto> mapFromJson(dynamic json) {
final map = <String, TagUpdateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateTagDto.fromJson(entry.value);
final value = TagUpdateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@ -84,14 +81,14 @@ class CreateTagDto {
return map;
}
// maps a json object with a list of CreateTagDto-objects as value to a dart map
static Map<String, List<CreateTagDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateTagDto>>{};
// maps a json object with a list of TagUpdateDto-objects as value to a dart map
static Map<String, List<TagUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagUpdateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = CreateTagDto.listFromJson(entry.value, growable: growable,);
map[entry.key] = TagUpdateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
@ -99,8 +96,6 @@ class CreateTagDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'name',
'type',
};
}

View file

@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class TagUpsertDto {
/// Returns a new [TagUpsertDto] instance.
TagUpsertDto({
this.tags = const [],
});
List<String> tags;
@override
bool operator ==(Object other) => identical(this, other) || other is TagUpsertDto &&
_deepEquality.equals(other.tags, tags);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(tags.hashCode);
@override
String toString() => 'TagUpsertDto[tags=$tags]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'tags'] = this.tags;
return json;
}
/// Returns a new [TagUpsertDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static TagUpsertDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return TagUpsertDto(
tags: json[r'tags'] is Iterable
? (json[r'tags'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<TagUpsertDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagUpsertDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TagUpsertDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, TagUpsertDto> mapFromJson(dynamic json) {
final map = <String, TagUpsertDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = TagUpsertDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of TagUpsertDto-objects as value to a dart map
static Map<String, List<TagUpsertDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagUpsertDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = TagUpsertDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'tags',
};
}