-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4eb9c8
commit 917057b
Showing
24 changed files
with
174 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,58 @@ | ||
# pokedart | ||
<samp> | ||
|
||
A new Flutter project. | ||
# <p align='center'>PokeDart by Luan Batista</p> | ||
# <p align='center'>Web, Desktop && Mobile: IOS | Android</p> | ||
|
||
## Getting Started | ||
## <p align='center'>Flutter</p> | ||
- ### The pokedart project was made for a company test, but it is much more than that. In it I learn one more skill, Mobx and I also develop my code in Flutter and Dart! Hope you like it! | ||
|
||
This project is a starting point for a Flutter application. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
## <p align='center'>Mobile Version: Android | IOS</p> | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. | ||
<p align="center"> | ||
<img width=250 src="assets/screenshots/video-demo.gif"/> | ||
<img width=250 src="assets/screenshots/shot1.jpg" /> | ||
<img width=250 src="assets/screenshots/shot2.jpg" /> | ||
<img width=250 src="assets/screenshots/shot3.jpg" /> | ||
<img width=250 src="assets/screenshots/shot4.jpg" /> | ||
<img width=250 src="assets/screenshots/shot5.jpg" /> | ||
<img width=250 src="assets/screenshots/shot6.jpg" /> | ||
|
||
</p> | ||
|
||
## <p align='center'>Web && Desktop</p> | ||
<p align="center"><img src="assets/screenshots/video-web.gif"/></p> | ||
|
||
|
||
|
||
## <p align='center'>@luanbatistadev</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/luanbatistadev"> | ||
<img align="center" alt="Luan Batista | GitHub" width="45px" src="assets\images\github ico.png" /> | ||
</a> | ||
<a href="https://twitter.com/luanbatistadev"> | ||
<img align="center" alt="Luan Batista | Twitter" width="45px" src="assets\images\twitter ico.png" /> | ||
</a> | ||
<a href="https://br.linkedin.com/in/luan-rafael-batista-ramos-4379941a8"> | ||
<img align="center" alt="Luan Batista | LinkedIn" width="45px" src="assets\images\linkedin ico.ico" /> | ||
</a> | ||
<a href="https://www.twitch.tv/luangamegg"> | ||
<img align="center" alt="Luan Batista | Twitch" width="45px" src="assets\images\twitch ico.png" /> | ||
</a> | ||
</p> | ||
|
||
<br> | ||
|
||
<samp> | ||
|
||
<h2 align="center"> | ||
Open Source | ||
</h2> | ||
<p align="center"> | ||
<sub>Copyright © 2022-present, Luan Batista.</sub> | ||
</p> | ||
<p align="center">PokeDart <a href="/LICENSE">is MIT licensed 💖</a></p> | ||
|
||
</samp> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,45 @@ | ||
import 'dart:convert'; | ||
|
||
import 'package:http/http.dart' as http; | ||
import 'package:pokedart/models/evolution.dart'; | ||
import 'package:pokedart/models/pokemon.dart'; | ||
|
||
Future<List<Pokemon>> fetchPokemonsFromApi() async { | ||
final response = await http.get( | ||
Uri.parse( | ||
'https://pokeapi.co/api/v2/pokemon-species?limit=100000&offset=0', | ||
), | ||
); | ||
final Map<String,dynamic> json = jsonDecode(response.body) as Map<String,dynamic>; | ||
final pokemonsJson = json['results'] as List; | ||
final pokemons = pokemonsJson.map((e) => Pokemon.fromJson(e as Map<String, dynamic>)).toList(); | ||
return pokemons; | ||
} | ||
|
||
Future<Pokemon> fetchDataPokemon(String name) async { | ||
EvolutionChain evolutionChain = EvolutionChain(); | ||
final response = | ||
await http.get(Uri.parse('https://pokeapi.co/api/v2/pokemon/$name')); | ||
final json = jsonDecode(response.body); | ||
final pokemonsJson = json as Map<String, dynamic>; | ||
final pokemon = Pokemon.fromJson(pokemonsJson); | ||
|
||
final responseEvolution = await http | ||
.get(Uri.parse('https://pokeapi.co/api/v2/pokemon-species/$name')); | ||
if (responseEvolution.statusCode == 200) { | ||
final Map<String,dynamic> jsonEvolution = jsonDecode(responseEvolution.body) as Map<String,dynamic>; | ||
final evolutionJson = | ||
jsonEvolution['evolution_chain'] as Map<String, dynamic>; | ||
evolutionChain = EvolutionChain.fromJson(evolutionJson); | ||
} | ||
|
||
final responseAbilities = await http.get(Uri.parse(evolutionChain.url!)); | ||
if (responseAbilities.statusCode == 200) { | ||
final jsonAbilities = jsonDecode(responseAbilities.body); | ||
final evolutionJson = jsonAbilities as Map<String, dynamic>; | ||
final evolution = Evolution.fromJson(evolutionJson); | ||
return pokemon.copyWith(evolution: evolution); | ||
} else { | ||
return pokemon; | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.