Pokédex application developed with Flutter.
This application is inspired by skydoves/Pokedex application for Android.
This project is a starting point for a Flutter application.
Here are a few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
- View for Pokémon List
- View for Pokémon Details
- Light/Dark Theme
Overview | Detail |
---|---|
Overview | Detail |
---|---|
graph TB
subgraph Presentation
subgraph Home
subgraph Views
HomeScreen <-->|navigate to| PokemonDetailsScreen
end
subgraph Widgets
PokemonBaseStatsIndicators
MetricDetails
ValueIndicator
PokemonCard
end
HomeScreen -->|uses|PokemonCard
PokemonDetailsScreen -->|uses|MetricDetails
PokemonDetailsScreen -->|uses|ValueIndicator
PokemonDetailsScreen -->|uses|PokemonBaseStatsIndicators
end
subgraph Splash
SplashScreen -->|navigate to| HomeScreen
end
end
subgraph Domain
PokemonRepository -->|config based on| PokemonListParams
end
subgraph Data
subgraph Data Source
PokemonDataSource
end
subgraph Models
Pokemon
PokemonList
PokemonList --> Pokemon
PokemonDetails
PokemonDetails --> PokemonStats
PokemonDetails --> PokemonType
PokemonStats --> Stats
PokemonType --> Types
end
PokemonDataSource ---|parse into model|PokemonList
PokemonDataSource ---|parse into model|PokemonDetails
end
PokemonDataSource -->|HTTP GET|API[(Pokemon API)]
HomeScreen <--> PokemonRepository
PokemonDetailsScreen <--> PokemonRepository
PokemonRepository -->|request data|PokemonDataSource
The folder structure of this project is as follows:
pokedex/
├── android/
├── assets/
├── ios/
├── lib/
│ ├── app.dart <-- all the application level configurations are defined here
│ ├── main.dart <-- starting point of the application
│ ├── app/ <-- all the application level configurations are defined, e.g., routes, title, orientation etc.
│ │ ├── config/
│ │ ├── dependency_injection/
│ │ ├── helpers/
│ │ ├── service_result/
│ │ └── services/
│ │ └── api/
│ ├── features/ <-- all features are represented as a subfolder
│ │ ├── home/ <-- feature 'home' screen
│ │ │ ├── data/ <-- a feature's data layer, includes data source (either local or remote)
│ │ │ ├── domain/ <-- a feature's domain layer, includes repository and params
│ │ │ └── presentation/ <-- a feature's presentation layer, includes widgets and screen
│ │ └── splash/ <-- feature 'splash' screen
│ │ └── presentation/
│ └── src/ <-- all application level constants, extensions and themes
│ ├── constants/ <-- all the application level constants here, e.g., baseURLs
│ ├── extensions/
│ └── res/ <-- all themes and colors
│ ├── color_scheme/
│ └── theme/
└── test/
Go to the project root and execute the following command to get the required dependencies:
flutter pub get
To run the project as an Android app, start the Android emulator and then run the following:
flutter run
To build an Android APK run the following:
flutter build apk
- Cached Network Image (Image Caching)
- Dio (HTTP calls)
- Palette Generator (Generate color palette from image)
- Percent Indicator (Percent Indicator)
External data source:
- PokeAPI (RESTful Pokémon API)
Copyright © 2023 Enoch Aikpokpodion
This work (source code) is licensed under MIT.