Files
pokemon_api_dart/lib/name.dart
Chen Asraf 9bc5f691ce feat: more types
chore: cleanup
2023-07-15 02:21:00 +03:00

25 lines
480 B
Dart

import 'base.dart';
import 'named_api_resource.dart';
class Name with ResourceBase {
final String name;
final NamedAPIResource language;
@override
final Map<String, dynamic> rawData;
Name({
required this.rawData,
required this.name,
required this.language,
});
factory Name.fromJson(Map<String, dynamic> json) {
return Name(
rawData: json,
name: json['name'],
language: NamedAPIResource.fromJson(json['language']),
);
}
}