mirror of
https://github.com/chenasraf/pokemon_api_dart.git
synced 2026-05-18 01:49:03 +00:00
25 lines
480 B
Dart
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']),
|
|
);
|
|
}
|
|
}
|
|
|