-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: link pokemon data between layers domain and presentation
- Loading branch information
1 parent
29feceb
commit e6c815d
Showing
7 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
pokedex/lib/features/pokemon_list/data/model/pokemon_list_details_response.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:json/json.dart'; | ||
|
||
import 'pokemon_type_slot_response.dart'; | ||
|
||
@JsonCodable() | ||
class PokemonListDetailsResponse { | ||
PokemonListDetailsResponse({ | ||
required this.name, | ||
required this.types, | ||
required this.id, | ||
}); | ||
|
||
final String name; | ||
final List<PokemonTypeSlotResponse> types; | ||
final int id; | ||
} |
14 changes: 14 additions & 0 deletions
14
pokedex/lib/features/pokemon_list/data/model/pokemon_type_slot_response.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:json/json.dart'; | ||
|
||
import '../../../../common/api/model/named_api_response.dart'; | ||
|
||
@JsonCodable() | ||
class PokemonTypeSlotResponse { | ||
PokemonTypeSlotResponse({ | ||
required this.slot, | ||
required this.type, | ||
}); | ||
|
||
final int slot; | ||
final NamedApiResponse type; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters