|
|
@ -9,13 +9,25 @@ part of 'tag.dart'; |
|
|
|
Tag _$TagFromJson(Map<String, dynamic> json) { |
|
|
|
Tag _$TagFromJson(Map<String, dynamic> json) { |
|
|
|
$checkKeys( |
|
|
|
$checkKeys( |
|
|
|
json, |
|
|
|
json, |
|
|
|
allowedKeys: const ['name'], |
|
|
|
allowedKeys: const ['name', 'description'], |
|
|
|
); |
|
|
|
); |
|
|
|
return Tag( |
|
|
|
return Tag( |
|
|
|
name: json['name'] as String, |
|
|
|
name: json['name'] as String, |
|
|
|
|
|
|
|
description: json['description'] as String?, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$TagToJson(Tag instance) => <String, dynamic>{ |
|
|
|
Map<String, dynamic> _$TagToJson(Tag instance) { |
|
|
|
|
|
|
|
final val = <String, dynamic>{ |
|
|
|
'name': instance.name, |
|
|
|
'name': instance.name, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void writeNotNull(String key, dynamic value) { |
|
|
|
|
|
|
|
if (value != null) { |
|
|
|
|
|
|
|
val[key] = value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
writeNotNull('description', instance.description); |
|
|
|
|
|
|
|
return val; |
|
|
|
|
|
|
|
} |
|
|
|