├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ └── dart.yml
├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── android
├── .project
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── app
│ ├── .classpath
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutte_pokedex
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── drawable
│ │ │ ├── launch_background.xml
│ │ │ └── splash_2.jpg
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── key.properties
└── settings.gradle
├── assets
├── images
│ ├── dotted.png
│ ├── pokeball.png
│ ├── pokeball_1.png
│ ├── pokimon_1.png
│ ├── pokimon_10.png
│ ├── pokimon_11.png
│ ├── pokimon_12.png
│ ├── pokimon_13.png
│ ├── pokimon_14.png
│ ├── pokimon_15.png
│ ├── pokimon_16.png
│ ├── pokimon_17.png
│ ├── pokimon_18.png
│ ├── pokimon_19.png
│ ├── pokimon_2.png
│ ├── pokimon_20.png
│ ├── pokimon_21.png
│ ├── pokimon_22.png
│ ├── pokimon_23.png
│ ├── pokimon_24.png
│ ├── pokimon_25.png
│ ├── pokimon_26.png
│ ├── pokimon_27.png
│ ├── pokimon_3.png
│ ├── pokimon_4.png
│ ├── pokimon_5.png
│ ├── pokimon_6.png
│ ├── pokimon_7.png
│ ├── pokimon_8.png
│ ├── pokimon_9.png
│ ├── splash_2.jpg
│ ├── types
│ │ ├── Bug.png
│ │ ├── Dark.png
│ │ ├── Dragon.png
│ │ ├── Electric.png
│ │ ├── Fairy.png
│ │ ├── Fight.png
│ │ ├── Fire.png
│ │ ├── Flying.png
│ │ ├── Ghost.png
│ │ ├── Grass.png
│ │ ├── Ground.png
│ │ ├── Ice.png
│ │ ├── Normal.png
│ │ ├── Poison.png
│ │ ├── Psychic.png
│ │ ├── Rock.png
│ │ ├── Steel.png
│ │ └── Water.png
│ └── web_hi_res_512.png
└── json
│ └── pokemonJson.txt
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Flutter.podspec
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── main.m
├── lib
├── helper
│ ├── CustomRect.dart
│ ├── colorTheme.dart
│ ├── constants.dart
│ └── enum.dart
├── main.dart
├── model
│ ├── MovesList.dart
│ ├── pokemon.dart
│ ├── pokemonDetail.dart
│ ├── pokemonList.dart
│ ├── pokemonMoves.dart
│ └── pokemonSpecies.dart
├── pages
│ ├── PokemonList
│ │ ├── pokemonListPage.dart
│ │ └── widget
│ │ │ ├── generationModel.dart
│ │ │ ├── pokemonCard.dart
│ │ │ ├── pokemonCard3.dart
│ │ │ └── pokemonCard_2.dart
│ ├── Types
│ │ ├── Details
│ │ │ └── moveDetailPage.dart
│ │ ├── pokemonMovesPage.dart
│ │ └── pokemonTypeListPage.dart
│ ├── homePageBody.dart
│ ├── pokemonDetailPage.dart
│ └── pokemonDetails
│ │ ├── about.dart
│ │ ├── baseState.dart
│ │ └── moves.dart
├── scoped_model
│ ├── appState.dart
│ ├── moveState.dart
│ └── pokemonState.dart
└── widgets
│ ├── HalfPainter.dart
│ └── customWidget.dart
├── pubspec.lock
├── pubspec.yaml
├── screenshots
├── screen.gif
├── screenshot_1.jpg
├── screenshot_10.jpg
├── screenshot_11.jpg
├── screenshot_12.jpg
├── screenshot_13.jpg
├── screenshot_14.jpg
├── screenshot_15.jpg
├── screenshot_16.jpg
├── screenshot_17.jpg
├── screenshot_2.jpg
├── screenshot_3.jpg
├── screenshot_4.jpg
├── screenshot_5.jpg
├── screenshot_6.jpg
├── screenshot_7.jpg
├── screenshot_8.jpg
└── screenshot_9.jpg
└── test
└── widget_test.dart
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [thealphamerc]
2 | patreon: # Replace with a single Patreon username
3 | open_collective: # Replace with a single Open Collective username
4 | ko_fi: # Replace with a single Ko-fi username
5 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
6 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
7 | liberapay: # Replace with a single Liberapay username
8 | issuehunt: # Replace with a single IssueHunt username
9 | otechie: # Replace with a single Otechie username
10 | custom: ['https://www.paypal.me/TheAlphamerc', 'https://www.buymeacoffee.com/thealphamerc']
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/dart.yml:
--------------------------------------------------------------------------------
1 | name: Dart CI
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build-and-test:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v1
10 | - uses: actions/setup-java@v1
11 | with:
12 | java-version: '12.x'
13 | - uses: subosito/flutter-action@v1
14 | with:
15 | channel: 'stable'
16 | # Get flutter packages
17 | - run: flutter pub get
18 | # Build :D
19 | - run: flutter build aot
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 | ios/Flutter/flutter_export_environment.sh
74 | android/key.jks
75 | .flutter-plugins-dependencies
76 | android/app/key.jks
77 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: b712a172f9694745f50505c93340883493b505e5
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Sonu Sharma
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## flutte_pokedex  [](https://github.com/login?return_to=%2FTheAlphamerc%flutter_pokedex) 
2 |      [](https://github.com/Thealphamerc/flutter_pokedex)
3 |
4 | A digital pokemon encyclopedia that categorizes Pokemon on the basis of their abilties, move, and power.
5 | The app design is based on [Pokedex App](https://dribbble.com/shots/6545819-Pokedex-Apps) designed by [Saepul Nahwan](https://dribbble.com/saepulnahwan23)
6 |
7 |
8 | ## Download App 
9 |
10 | ## Video Url
11 | Youtube link :- [Pokedex Flutter App](https://youtu.be/jfXT94BnxXk)
12 | ## Screenshots
13 |
14 | Screenshots | Screenshots | Screenshots
15 | :-------------------------:|:-------------------------:|:-------------------------:
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 |
23 |
24 |
25 |
26 |
27 | # Pull Requests
28 |
29 | I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:
30 |
31 | 1. Match coding style (braces, spacing, etc.) This is best achieved using `Reformat Code` feature of Android Studio `CMD`+`Option`+`L` on Mac and `CTRL` + `ALT` + `L` on Linux + Windows .
32 | 2. If its a feature, bugfix, or anything please only change code to what you specify.
33 | 3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
34 | 4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.
35 | 5. Check for existing [issues](https://github.com/TheAlphamerc/flutter_pokedex/issues) first, before filing an issue.
36 | 6. Make sure you follow the set standard as all other projects in this repo do
37 | 7. Have fun!
38 |
39 |
40 | ## Flutter projects
41 | Project Name |Stars
42 | :-------------------------|-------------------------
43 | [Twitter clone](https://github.com/TheAlphamerc/flutter_twitter_clone)| [](https://github.com/login?return_to=%2FTheAlphamerc%flutter_twitter_clone)
44 | |[Ecommerce App](https://github.com/TheAlphamerc/flutter_ecommerce_app) |[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_ecommerce_app)
45 | |[Smart course](https://github.com/TheAlphamerc/flutter_smart_course) |[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_smart_course)
46 | |[Healthcare App](https://github.com/TheAlphamerc/flutter_healthcare_app)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_healthcare_app)
47 | |[Authentication](https://github.com/TheAlphamerc/flutter_login_signup)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_login_signup)
48 | |[Wallet App](https://github.com/TheAlphamerc/flutter_wallet_app)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_wallet_app)
49 | |[News App](https://github.com/TheAlphamerc/flutter_news_app)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_news_app)
50 | |[Watch App](https://github.com/TheAlphamerc/flutter_SoftUI_watchApp)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_SoftUI_watchApp)
51 | |[Smart Home App](https://github.com/TheAlphamerc/flutter_smart_home_app)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_smart_home_app)
52 | |[Yatch Booking App](https://github.com/TheAlphamerc/flutter_yatch_booking)|[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_yatch_booking)
53 |
54 | ## Flutter packages
55 | Package Name | Stars
56 | :-------------------------|-------------------------
57 | |[Empty widget](https://github.com/TheAlphamerc/empty_widget) |[](https://github.com/login?return_to=%2FTheAlphamerc%empty_widget)
58 | |[Add Thumbnail](https://github.com/TheAlphamerc/flutter_plugin_add_thumbnail) |[](https://github.com/login?return_to=%2FTheAlphamerc%flutter_plugin_add_thumbnail)
59 | |[Filter List](https://github.com/TheAlphamerc/flutter_plugin_filter_list)| [](https://github.com/login?return_to=%2FTheAlphamerc%flutter_plugin_filter_list)
60 | |[Country Provider](https://github.com/TheAlphamerc/country_provider)| [](https://github.com/login?return_to=%2FTheAlphamerc%country_provider)
61 |
62 | ### Created & Maintained By
63 |
64 | [Sonu Sharma](https://github.com/TheAlphamerc) ([Twitter](https://www.twitter.com/TheAlphamerc)) ([Youtube](https://www.youtube.com/user/sonusharma045sonu/))
65 | ([Insta](https://www.instagram.com/_sonu_sharma__))
66 |
67 | > If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:
68 | >
69 | > * [PayPal](https://www.paypal.me/TheAlphamerc/)
70 |
71 | > You can also nominate me for Github Star developer program
72 | > https://stars.github.com/nominate
73 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 | /// Comment below for debug mode
27 | def keystoreProperties = new Properties()
28 | def keystorePropertiesFile = rootProject.file('key.properties')
29 | if (keystorePropertiesFile.exists()) {
30 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
31 | }
32 | android {
33 | compileSdkVersion 28
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.thealphamerc.flutte_pokedex"
42 | minSdkVersion 21
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | /// UnComment it for debug mode
50 | // buildTypes {
51 | // release {
52 | // // TODO: Add your own signing config for the release build.
53 | // // Signing with the debug keys for now, so `flutter run --release` works.
54 | // signingConfig signingConfigs.debug
55 | // }
56 | // }
57 | /// Comment below for debug mode
58 | signingConfigs {
59 | release {
60 | keyAlias keystoreProperties['keyAlias']
61 | keyPassword keystoreProperties['keyPassword']
62 | storeFile file(keystoreProperties['storeFile'])
63 | storePassword keystoreProperties['storePassword']
64 | }
65 | }
66 | /// Comment below for debug mode
67 | buildTypes {
68 | release {
69 | // minifyEnabled true
70 | signingConfig signingConfigs.release
71 | }
72 | }
73 | }
74 |
75 | flutter {
76 | source '../..'
77 | }
78 |
79 | dependencies {
80 | testImplementation 'junit:junit:4.12'
81 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
82 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
83 | }
84 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
11 |
15 |
22 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/example/flutte_pokedex/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.flutte_pokedex;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | -
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/splash_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/android/app/src/main/res/drawable/splash_2.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 | android.enableR8=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/key.properties:
--------------------------------------------------------------------------------
1 | storePassword=123456
2 | keyPassword=123456
3 | keyAlias=key
4 | storeFile=/key.jks
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/assets/images/dotted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/dotted.png
--------------------------------------------------------------------------------
/assets/images/pokeball.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokeball.png
--------------------------------------------------------------------------------
/assets/images/pokeball_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokeball_1.png
--------------------------------------------------------------------------------
/assets/images/pokimon_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_1.png
--------------------------------------------------------------------------------
/assets/images/pokimon_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_10.png
--------------------------------------------------------------------------------
/assets/images/pokimon_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_11.png
--------------------------------------------------------------------------------
/assets/images/pokimon_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_12.png
--------------------------------------------------------------------------------
/assets/images/pokimon_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_13.png
--------------------------------------------------------------------------------
/assets/images/pokimon_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_14.png
--------------------------------------------------------------------------------
/assets/images/pokimon_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_15.png
--------------------------------------------------------------------------------
/assets/images/pokimon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_16.png
--------------------------------------------------------------------------------
/assets/images/pokimon_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_17.png
--------------------------------------------------------------------------------
/assets/images/pokimon_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_18.png
--------------------------------------------------------------------------------
/assets/images/pokimon_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_19.png
--------------------------------------------------------------------------------
/assets/images/pokimon_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_2.png
--------------------------------------------------------------------------------
/assets/images/pokimon_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_20.png
--------------------------------------------------------------------------------
/assets/images/pokimon_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_21.png
--------------------------------------------------------------------------------
/assets/images/pokimon_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_22.png
--------------------------------------------------------------------------------
/assets/images/pokimon_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_23.png
--------------------------------------------------------------------------------
/assets/images/pokimon_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_24.png
--------------------------------------------------------------------------------
/assets/images/pokimon_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_25.png
--------------------------------------------------------------------------------
/assets/images/pokimon_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_26.png
--------------------------------------------------------------------------------
/assets/images/pokimon_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_27.png
--------------------------------------------------------------------------------
/assets/images/pokimon_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_3.png
--------------------------------------------------------------------------------
/assets/images/pokimon_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_4.png
--------------------------------------------------------------------------------
/assets/images/pokimon_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_5.png
--------------------------------------------------------------------------------
/assets/images/pokimon_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_6.png
--------------------------------------------------------------------------------
/assets/images/pokimon_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_7.png
--------------------------------------------------------------------------------
/assets/images/pokimon_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_8.png
--------------------------------------------------------------------------------
/assets/images/pokimon_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/pokimon_9.png
--------------------------------------------------------------------------------
/assets/images/splash_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/splash_2.jpg
--------------------------------------------------------------------------------
/assets/images/types/Bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Bug.png
--------------------------------------------------------------------------------
/assets/images/types/Dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Dark.png
--------------------------------------------------------------------------------
/assets/images/types/Dragon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Dragon.png
--------------------------------------------------------------------------------
/assets/images/types/Electric.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Electric.png
--------------------------------------------------------------------------------
/assets/images/types/Fairy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Fairy.png
--------------------------------------------------------------------------------
/assets/images/types/Fight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Fight.png
--------------------------------------------------------------------------------
/assets/images/types/Fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Fire.png
--------------------------------------------------------------------------------
/assets/images/types/Flying.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Flying.png
--------------------------------------------------------------------------------
/assets/images/types/Ghost.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Ghost.png
--------------------------------------------------------------------------------
/assets/images/types/Grass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Grass.png
--------------------------------------------------------------------------------
/assets/images/types/Ground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Ground.png
--------------------------------------------------------------------------------
/assets/images/types/Ice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Ice.png
--------------------------------------------------------------------------------
/assets/images/types/Normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Normal.png
--------------------------------------------------------------------------------
/assets/images/types/Poison.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Poison.png
--------------------------------------------------------------------------------
/assets/images/types/Psychic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Psychic.png
--------------------------------------------------------------------------------
/assets/images/types/Rock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Rock.png
--------------------------------------------------------------------------------
/assets/images/types/Steel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Steel.png
--------------------------------------------------------------------------------
/assets/images/types/Water.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/types/Water.png
--------------------------------------------------------------------------------
/assets/images/web_hi_res_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/assets/images/web_hi_res_512.png
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Flutter.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # NOTE: This podspec is NOT to be published. It is only used as a local source!
3 | #
4 |
5 | Pod::Spec.new do |s|
6 | s.name = 'Flutter'
7 | s.version = '1.0.0'
8 | s.summary = 'High-performance, high-fidelity mobile apps.'
9 | s.description = <<-DESC
10 | Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
11 | DESC
12 | s.homepage = 'https://flutter.io'
13 | s.license = { :type => 'MIT' }
14 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
15 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
16 | s.ios.deployment_target = '8.0'
17 | s.vendored_frameworks = 'Flutter.framework'
18 | end
19 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | generated_key_values = {}
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) do |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | generated_key_values[podname] = podpath
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | end
32 | generated_key_values
33 | end
34 |
35 | target 'Runner' do
36 | # Flutter Pod
37 | use_frameworks!
38 |
39 | copied_flutter_dir = File.join(__dir__, 'Flutter')
40 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
41 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
42 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
43 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
44 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
45 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
46 |
47 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
48 | unless File.exist?(generated_xcode_build_settings_path)
49 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
50 | end
51 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
52 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
53 |
54 | unless File.exist?(copied_framework_path)
55 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
56 | end
57 | unless File.exist?(copied_podspec_path)
58 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
59 | end
60 | end
61 |
62 | # Keep pod path relative so it can be checked into Podfile.lock.
63 | pod 'Flutter', :path => 'Flutter'
64 |
65 | # Plugin Pods
66 |
67 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
68 | # referring to absolute paths on developers' machines.
69 | system('rm -rf .symlinks')
70 | system('mkdir -p .symlinks/plugins')
71 | plugin_pods = parse_KV_file('../.flutter-plugins')
72 | plugin_pods.each do |name, path|
73 | symlink = File.join('.symlinks', 'plugins', name)
74 | File.symlink(path, symlink)
75 | pod name, :path => File.join(symlink, 'ios')
76 | end
77 | end
78 |
79 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
80 | install! 'cocoapods', :disable_input_output_paths => true
81 |
82 | post_install do |installer|
83 | installer.pods_project.targets.each do |target|
84 | target.build_configurations.each do |config|
85 | config.build_settings['ENABLE_BITCODE'] = 'NO'
86 | config.build_settings['SWIFT_VERSION'] = '4.0'
87 | end
88 | end
89 | end
90 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheAlphamerc/flutter_pokedex/ab2cbbf2f7deaa003367d3f44292b70ed74516ea/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutte_pokedex
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/helper/CustomRect.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/painting.dart';
3 |
4 | class CustomRect extends CustomClipper{
5 | @override
6 | Rect getClip(Size size) {
7 |
8 | }
9 | @override
10 | bool shouldReclip(CustomRect oldClipper) {
11 |
12 | }
13 | }
--------------------------------------------------------------------------------
/lib/helper/colorTheme.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | Color setSecondaryColor(String type){
6 | if(type == null){
7 | return Color(0xfff79496);
8 | }
9 | type = type.toLowerCase();
10 | // return type.contains('Grass') ? Color(0xff57dcc1) :
11 | // type.contains('Water') ? Color(0xff84c9f3) :
12 | // type.contains('Rock') ? Color(0xffd1dadf) :
13 | // Color(0xfffc7f7b);
14 | return type.contains('grass') ? Color(0xff8ede54) :
15 | type.contains('water') ? Color(0xFF58ABF6) :
16 | type.contains('rock') ? Color(0xffd5e1eb) :
17 | type.contains('bug') ? Color(0xff50f2d0):
18 | type.contains('normal') ? Color(0xff9fc7b7) :
19 | type.contains('poison') ? Color(0xff5685f5) :
20 | type.contains('electric') ? Color(0xfffaf25f) :
21 | type.contains('ground') ? Color(0xfff0c37d) :
22 | type.contains('ice') ? Color(0xff7aedfa) :
23 | type.contains('dark') ? Color(0xffd3e0e0) :
24 | type.contains('fairy') ? Color(0xff9f71e3) :
25 | type.contains('psychic') ? Color(0xffce91eb) :
26 | type.contains('fighting') ? Color(0xff9cd44e) :
27 | type.contains('ghost') ? Color(0xff6d3bad) :
28 | Color(0xfff79496);
29 | }
30 | Color setprimaryColor(String type){
31 | if(type == null){
32 | return Color(0xfff79496);
33 | }
34 | type = type.toLowerCase();
35 | return type.contains('grass') ? Color(0xff68c724) :
36 | type.contains('water') ? Color(0xFF429BED) :
37 | type.contains('rock') ? Color(0xffbbc7d1) :
38 | type.contains('bug') ? Color(0xff4bcfb2) :
39 | type.contains('normal') ? Color(0xff9AB8AC) :
40 | type.contains('poison') ? Color(0xff094be8) :
41 | type.contains('electric') ? Color(0xffe8dd09) :
42 | type.contains('ground') ? Color(0xffcf9b48) :
43 | type.contains('ice') ? Color(0xff1bcfe3) :
44 | type.contains('dark') ? Color(0xff9bbfbf) :
45 | type.contains('fairy') ? Color(0xff784abd) :
46 | type.contains('psychic') ? Color(0xffbc6ee0) :
47 | type.contains('fighting') ? Color(0xff72ab22) :
48 | type.contains('ghost') ? Color(0xff42206e) :
49 | Color(0xfffc6b6d);
50 | }
51 |
52 | Color getRendomColor(int index){
53 | List list = [
54 | Color(0xff75bffc)
55 | , Color(0xffbbc7d1)
56 | // , Color(0xff4bcfb2)
57 | // , Color(0xff68c724)
58 | // , Color(0xff9AB8AC)
59 | // , Color(0xffe8dd09)
60 | // , Color(0xffcf9b48)
61 | , Color(0xff1bcfe3)
62 | // , Color(0xff9bbfbf)
63 | // , Color(0xffbc6ee0)
64 | // , Color(0xff72ab22)
65 | ];
66 | var no =index == 0 ? 0 : index % 3 ;
67 | // var index = Random().nextInt(14);
68 | return list[no];
69 | }
70 | class AppColors{
71 | AppColors._();
72 | static Color pokeballColor = Color(0xfff2f2f2);
73 | }
74 |
--------------------------------------------------------------------------------
/lib/helper/constants.dart:
--------------------------------------------------------------------------------
1 | String apiBaseUri = 'https://pokeapi.co/api/v2/';
2 | String apiPokemonList = 'https://pokedexvuejs.herokuapp.com/pokedexdb';
3 | String apiPokemonDetail = 'pokemon/';
4 | String apiPokemonSpecies = 'pokemon-species/';
5 | String apiPokemonMoves = 'move/';
--------------------------------------------------------------------------------
/lib/helper/enum.dart:
--------------------------------------------------------------------------------
1 | enum HomePageButtonEnum{
2 | Pokemon,
3 | Move,
4 | Abilitie,
5 | Item,
6 | Location,
7 | Type,
8 | Habitats,
9 | Berries
10 | }
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutte_pokedex/model/pokemon.dart';
2 | import 'package:flutte_pokedex/pages/homePageBody.dart';
3 | import 'package:flutte_pokedex/pages/pokemonDetailPage.dart';
4 | import 'package:flutte_pokedex/scoped_model/moveState.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:provider/provider.dart';
7 |
8 | import 'pages/PokemonList/pokemonListPage.dart';
9 | import 'pages/Types/pokemonMovesPage.dart';
10 | import 'scoped_model/pokemonState.dart';
11 |
12 |
13 | void main() => runApp(MyApp());
14 |
15 | class MyApp extends StatelessWidget {
16 | Pokemon pokemonModel;
17 | PokemonState _pokemonState = PokemonState();
18 | @override
19 | Widget build(BuildContext context) {
20 | return MultiProvider(
21 | providers: [
22 | ChangeNotifierProvider(builder: (context) => _pokemonState),
23 | ChangeNotifierProvider(builder: (context) => MoveState()),
24 | ],
25 | child: MaterialApp(
26 | title: 'Flutter Demo',
27 | theme: ThemeData(
28 | primarySwatch: Colors.blue,
29 | textTheme: TextTheme(
30 | body1: TextStyle(fontSize: 14),
31 | body2: TextStyle(fontSize: 16),
32 | title: TextStyle(fontSize: 16),
33 | subtitle: TextStyle(fontSize: 12),
34 | caption: TextStyle(fontSize: 14),
35 | subhead: TextStyle(fontSize: 16),
36 | headline: TextStyle(fontSize: 16)
37 | )
38 | ),
39 | // home: MyHomePage(),
40 | routes: {
41 | '/': (BuildContext context) => MyHomePage(),
42 | '/pokemonList': (BuildContext context) =>
43 | PokemonListPage(),
44 | '/detail': (BuildContext context) => PokemonDetailPage()
45 | },
46 | onGenerateRoute: (RouteSettings settings ){
47 | final List pathElements = settings.name.split('/');
48 | if (pathElements[0] != '') {
49 | return null;
50 | }
51 | if(pathElements[1].contains('detail')){
52 | var name = pathElements[2];
53 | return MaterialPageRoute(builder:(BuildContext context)=> PokemonDetailPage(name:name,));
54 | }
55 | if(pathElements[1].contains('moves')){
56 | return MaterialPageRoute(builder:(BuildContext context)=> PokemonMovesPage());
57 | }
58 | },
59 | )
60 | );
61 |
62 | }
63 | }
64 |
65 | class MyHomePage extends StatefulWidget {
66 | // final MainModel model;
67 | @override
68 | _MyHomePageState createState() => _MyHomePageState();
69 | }
70 |
71 | class _MyHomePageState extends State {
72 | bool isViewAll = false;
73 | double viewAllHeight = 0;
74 |
75 | @override
76 | Widget build(BuildContext context) {
77 | return Scaffold(backgroundColor: Color(0xfff4f4f4), body: HomePageBody());
78 | }
79 | }
--------------------------------------------------------------------------------
/lib/model/MovesList.dart:
--------------------------------------------------------------------------------
1 | // To parse this JSON data, do
2 | //
3 | // final movesResponse = movesResponseFromJson(jsonString);
4 |
5 | import 'dart:convert';
6 |
7 | MovesResponse movesResponseFromJson(String str) => MovesResponse.fromJson(json.decode(str));
8 |
9 | String movesResponseToJson(MovesResponse data) => json.encode(data.toJson());
10 |
11 | class MovesResponse {
12 | int count;
13 | String next;
14 | String previous;
15 | List results;
16 |
17 | MovesResponse({
18 | this.count,
19 | this.next,
20 | this.previous,
21 | this.results,
22 | });
23 |
24 | factory MovesResponse.fromJson(Map json) => MovesResponse(
25 | count: json["count"],
26 | next: json["next"],
27 | previous: json["previous"],
28 | results: List.from(json["results"].map((x) => Result.fromJson(x))),
29 | );
30 |
31 | Map toJson() => {
32 | "count": count,
33 | "next": next,
34 | "previous": previous,
35 | "results": List.from(results.map((x) => x.toJson())),
36 | };
37 | }
38 |
39 | class Result {
40 | String name;
41 | String url;
42 |
43 | Result({
44 | this.name,
45 | this.url,
46 | });
47 |
48 | factory Result.fromJson(Map json) => Result(
49 | name: json["name"],
50 | url: json["url"],
51 | );
52 |
53 | Map toJson() => {
54 | "name": name,
55 | "url": url,
56 | };
57 | }
58 |
--------------------------------------------------------------------------------
/lib/model/pokemon.dart:
--------------------------------------------------------------------------------
1 | class Pokemon{
2 | final int id;
3 | final String name;
4 | final String image;
5 | final String type;
6 | Pokemon({this.id,this.name, this.image, this.type});
7 | }
--------------------------------------------------------------------------------
/lib/model/pokemonDetail.dart:
--------------------------------------------------------------------------------
1 | // To parse this JSON data, do
2 | //
3 | // final pokemonDetail = pokemonDetailFromJson(jsonString);
4 |
5 | import 'dart:convert';
6 |
7 | PokemonDetail pokemonDetailFromJson(String str) {
8 | return PokemonDetail.fromJson(json.decode(str));
9 | }
10 | PokemonDetail pokemonDetailFromJson1(String str) {
11 | PokemonDetail.fromJson(json.decode(str).map((x) => PokemonDetail.fromJson(x)));
12 |
13 | // String welcomeToJson(List data) => json.encode(List.from(data.map((x) => x.toJson())));
14 | }
15 |
16 | String pokemonDetailToJson(PokemonDetail data) => json.encode(data.toJson());
17 |
18 | class PokemonDetail {
19 | int id;
20 | String name;
21 | int baseExperience;
22 | int height;
23 | bool isDefault;
24 | int order;
25 | int weight;
26 | List abilities;
27 | List forms;
28 | List gameIndices;
29 | List heldItems;
30 | List locationAreaEncounters;
31 | List moves;
32 | Species species;
33 | Sprites sprites;
34 | List stats;
35 | List types;
36 |
37 | PokemonDetail({
38 | this.id,
39 | this.name,
40 | this.baseExperience,
41 | this.height,
42 | this.isDefault,
43 | this.order,
44 | this.weight,
45 | this.abilities,
46 | this.forms,
47 | this.gameIndices,
48 | this.heldItems,
49 | this.locationAreaEncounters,
50 | this.moves,
51 | this.species,
52 | this.sprites,
53 | this.stats,
54 | this.types,
55 | });
56 |
57 | factory PokemonDetail.fromJson(Map json) => PokemonDetail(
58 | id: json["id"],
59 | name: json["name"],
60 | baseExperience: json["base_experience"],
61 | height: json["height"],
62 | isDefault: json["is_default"],
63 | order: json["order"],
64 | weight: json["weight"],
65 | abilities: List.from(json["abilities"].map((x) => Ability.fromJson(x))),
66 | forms: List.from(json["forms"].map((x) => Species.fromJson(x))),
67 | gameIndices: List.from(json["game_indices"].map((x) => GameIndex.fromJson(x))),
68 | // heldItems: List.from(json["held_items"].map((x) => HeldItem.fromJson(x))),
69 | // locationAreaEncounters: List.from(json["location_area_encounters"].map((x) => LocationAreaEncounter.fromJson(x))),
70 | moves: List.from(json["moves"].map((x) => Move.fromJson(x))),
71 | species: Species.fromJson(json["species"]),
72 | sprites: Sprites.fromJson(json["sprites"]),
73 | stats: List.from(json["stats"].map((x) => Stat.fromJson(x))),
74 | types: List.from(json["types"].map((x) => Type.fromJson(x))),
75 | );
76 |
77 | Map toJson() => {
78 | "id": id,
79 | "name": name,
80 | "base_experience": baseExperience,
81 | "height": height,
82 | "is_default": isDefault,
83 | "order": order,
84 | "weight": weight,
85 | "abilities": List.from(abilities.map((x) => x.toJson())),
86 | "forms": List.from(forms.map((x) => x.toJson())),
87 | "game_indices": List.from(gameIndices.map((x) => x.toJson())),
88 | "held_items": List.from(heldItems.map((x) => x.toJson())),
89 | "location_area_encounters": List.from(locationAreaEncounters.map((x) => x.toJson())),
90 | "moves": List.from(moves.map((x) => x.toJson())),
91 | "species": species.toJson(),
92 | "sprites": sprites.toJson(),
93 | "stats": List.from(stats.map((x) => x.toJson())),
94 | "types": List.from(types.map((x) => x.toJson())),
95 | };
96 | }
97 |
98 | class Ability {
99 | bool isHidden;
100 | int slot;
101 | Species ability;
102 |
103 | Ability({
104 | this.isHidden,
105 | this.slot,
106 | this.ability,
107 | });
108 |
109 | factory Ability.fromJson(Map json) => Ability(
110 | isHidden: json["is_hidden"],
111 | slot: json["slot"],
112 | ability: Species.fromJson(json["ability"]),
113 | );
114 |
115 | Map toJson() => {
116 | "is_hidden": isHidden,
117 | "slot": slot,
118 | "ability": ability.toJson(),
119 | };
120 | }
121 |
122 | class Species {
123 | String name;
124 | String url;
125 |
126 | Species({
127 | this.name,
128 | this.url,
129 | });
130 |
131 | factory Species.fromJson(Map json) => Species(
132 | name: json["name"],
133 | url: json["url"],
134 | );
135 |
136 | Map toJson() => {
137 | "name": name,
138 | "url": url,
139 | };
140 | }
141 |
142 | class GameIndex {
143 | int gameIndex;
144 | Species version;
145 |
146 | GameIndex({
147 | this.gameIndex,
148 | this.version,
149 | });
150 |
151 | factory GameIndex.fromJson(Map json) => GameIndex(
152 | gameIndex: json["game_index"],
153 | version: Species.fromJson(json["version"]),
154 | );
155 |
156 | Map toJson() => {
157 | "game_index": gameIndex,
158 | "version": version.toJson(),
159 | };
160 | }
161 |
162 | class HeldItem {
163 | Species item;
164 | List versionDetails;
165 |
166 | HeldItem({
167 | this.item,
168 | this.versionDetails,
169 | });
170 |
171 | factory HeldItem.fromJson(Map json) => HeldItem(
172 | item: Species.fromJson(json["item"]),
173 | versionDetails: List.from(json["version_details"].map((x) => HeldItemVersionDetail.fromJson(x))),
174 | );
175 |
176 | Map toJson() => {
177 | "item": item.toJson(),
178 | "version_details": List.from(versionDetails.map((x) => x.toJson())),
179 | };
180 | }
181 |
182 | class HeldItemVersionDetail {
183 | int rarity;
184 | Species version;
185 |
186 | HeldItemVersionDetail({
187 | this.rarity,
188 | this.version,
189 | });
190 |
191 | factory HeldItemVersionDetail.fromJson(Map json) => HeldItemVersionDetail(
192 | rarity: json["rarity"],
193 | version: Species.fromJson(json["version"]),
194 | );
195 |
196 | Map toJson() => {
197 | "rarity": rarity,
198 | "version": version.toJson(),
199 | };
200 | }
201 |
202 | class LocationAreaEncounter {
203 | Species locationArea;
204 | List versionDetails;
205 |
206 | LocationAreaEncounter({
207 | this.locationArea,
208 | this.versionDetails,
209 | });
210 |
211 | factory LocationAreaEncounter.fromJson(Map json) => LocationAreaEncounter(
212 | locationArea: Species.fromJson(json["location_area"]),
213 | versionDetails: List.from(json["version_details"].map((x) => LocationAreaEncounterVersionDetail.fromJson(x))),
214 | );
215 |
216 | Map toJson() => {
217 | "location_area": locationArea.toJson(),
218 | "version_details": List.from(versionDetails.map((x) => x.toJson())),
219 | };
220 | }
221 |
222 | class LocationAreaEncounterVersionDetail {
223 | int maxChance;
224 | List encounterDetails;
225 | Species version;
226 |
227 | LocationAreaEncounterVersionDetail({
228 | this.maxChance,
229 | this.encounterDetails,
230 | this.version,
231 | });
232 |
233 | factory LocationAreaEncounterVersionDetail.fromJson(Map json) => LocationAreaEncounterVersionDetail(
234 | maxChance: json["max_chance"],
235 | encounterDetails: List.from(json["encounter_details"].map((x) => EncounterDetail.fromJson(x))),
236 | version: Species.fromJson(json["version"]),
237 | );
238 |
239 | Map toJson() => {
240 | "max_chance": maxChance,
241 | "encounter_details": List.from(encounterDetails.map((x) => x.toJson())),
242 | "version": version.toJson(),
243 | };
244 | }
245 |
246 | class EncounterDetail {
247 | int minLevel;
248 | int maxLevel;
249 | List conditionValues;
250 | int chance;
251 | Species method;
252 |
253 | EncounterDetail({
254 | this.minLevel,
255 | this.maxLevel,
256 | this.conditionValues,
257 | this.chance,
258 | this.method,
259 | });
260 |
261 | factory EncounterDetail.fromJson(Map json) => EncounterDetail(
262 | minLevel: json["min_level"],
263 | maxLevel: json["max_level"],
264 | conditionValues: List.from(json["condition_values"].map((x) => Species.fromJson(x))),
265 | chance: json["chance"],
266 | method: Species.fromJson(json["method"]),
267 | );
268 |
269 | Map toJson() => {
270 | "min_level": minLevel,
271 | "max_level": maxLevel,
272 | "condition_values": List.from(conditionValues.map((x) => x.toJson())),
273 | "chance": chance,
274 | "method": method.toJson(),
275 | };
276 | }
277 |
278 | class Move {
279 | Species move;
280 | List versionGroupDetails;
281 |
282 | Move({
283 | this.move,
284 | this.versionGroupDetails,
285 | });
286 |
287 | factory Move.fromJson(Map json) => Move(
288 | move: Species.fromJson(json["move"]),
289 | versionGroupDetails: List.from(json["version_group_details"].map((x) => VersionGroupDetail.fromJson(x))),
290 | );
291 |
292 | Map toJson() => {
293 | "move": move.toJson(),
294 | "version_group_details": List.from(versionGroupDetails.map((x) => x.toJson())),
295 | };
296 | }
297 |
298 | class VersionGroupDetail {
299 | int levelLearnedAt;
300 | Species versionGroup;
301 | Species moveLearnMethod;
302 |
303 | VersionGroupDetail({
304 | this.levelLearnedAt,
305 | this.versionGroup,
306 | this.moveLearnMethod,
307 | });
308 |
309 | factory VersionGroupDetail.fromJson(Map json) => VersionGroupDetail(
310 | levelLearnedAt: json["level_learned_at"],
311 | versionGroup: Species.fromJson(json["version_group"]),
312 | moveLearnMethod: Species.fromJson(json["move_learn_method"]),
313 | );
314 |
315 | Map toJson() => {
316 | "level_learned_at": levelLearnedAt,
317 | "version_group": versionGroup.toJson(),
318 | "move_learn_method": moveLearnMethod.toJson(),
319 | };
320 | }
321 |
322 | class Sprites {
323 | String backFemale;
324 | String backShinyFemale;
325 | String backDefault;
326 | String frontFemale;
327 | String frontShinyFemale;
328 | String backShiny;
329 | String frontDefault;
330 | String frontShiny;
331 |
332 | Sprites({
333 | this.backFemale,
334 | this.backShinyFemale,
335 | this.backDefault,
336 | this.frontFemale,
337 | this.frontShinyFemale,
338 | this.backShiny,
339 | this.frontDefault,
340 | this.frontShiny,
341 | });
342 |
343 | factory Sprites.fromJson(Map json) => Sprites(
344 | backFemale: json["back_female"],
345 | backShinyFemale: json["back_shiny_female"],
346 | backDefault: json["back_default"],
347 | frontFemale: json["front_female"],
348 | frontShinyFemale: json["front_shiny_female"],
349 | backShiny: json["back_shiny"],
350 | frontDefault: json["front_default"],
351 | frontShiny: json["front_shiny"],
352 | );
353 |
354 | Map toJson() => {
355 | "back_female": backFemale,
356 | "back_shiny_female": backShinyFemale,
357 | "back_default": backDefault,
358 | "front_female": frontFemale,
359 | "front_shiny_female": frontShinyFemale,
360 | "back_shiny": backShiny,
361 | "front_default": frontDefault,
362 | "front_shiny": frontShiny,
363 | };
364 | }
365 |
366 | class Stat {
367 | int baseStat;
368 | int effort;
369 | Species stat;
370 |
371 | Stat({
372 | this.baseStat,
373 | this.effort,
374 | this.stat,
375 | });
376 |
377 | factory Stat.fromJson(Map json) => Stat(
378 | baseStat: json["base_stat"],
379 | effort: json["effort"],
380 | stat: Species.fromJson(json["stat"]),
381 | );
382 |
383 | Map toJson() => {
384 | "base_stat": baseStat,
385 | "effort": effort,
386 | "stat": stat.toJson(),
387 | };
388 | }
389 |
390 | class Type {
391 | int slot;
392 | Species type;
393 |
394 | Type({
395 | this.slot,
396 | this.type,
397 | });
398 |
399 | factory Type.fromJson(Map json) => Type(
400 | slot: json["slot"],
401 | type: Species.fromJson(json["type"]),
402 | );
403 |
404 | Map toJson() => {
405 | "slot": slot,
406 | "type": type.toJson(),
407 | };
408 | }
409 |
--------------------------------------------------------------------------------
/lib/model/pokemonList.dart:
--------------------------------------------------------------------------------
1 | // To parse this JSON data, do
2 | //
3 | // final welcome = pokemonListResponseFromJson(jsonString);
4 |
5 | import 'dart:convert';
6 |
7 | List pokemonListResponseFromJson(String str) {
8 | return List.from(json.decode(str).map((x) => PokemonListModel.fromJson(x)));
9 |
10 | // String welcomeToJson(List data) => json.encode(List.from(data.map((x) => x.toJson())));
11 | }
12 |
13 | String pokemonListResponse(List data) => json.encode(List.from(data.map((x) => x.toJson())));
14 |
15 | class PokemonListModel {
16 | String id;
17 | int orderId;
18 | int nDex;
19 | String name;
20 | String type1;
21 | String type2;
22 | String ability1;
23 | String ability2;
24 | String hiddenability;
25 | int hp;
26 | int atk;
27 | int def;
28 | int spatk;
29 | int spdef;
30 | int spe;
31 | String note;
32 | String tier;
33 | String image;
34 |
35 | PokemonListModel({
36 | this.id,
37 | this.orderId,
38 | this.nDex,
39 | this.name,
40 | this.type1,
41 | this.type2,
42 | this.ability1,
43 | this.ability2,
44 | this.hiddenability,
45 | this.hp,
46 | this.atk,
47 | this.def,
48 | this.spatk,
49 | this.spdef,
50 | this.spe,
51 | this.note,
52 | this.tier,
53 | this.image,
54 | });
55 |
56 | factory PokemonListModel.fromJson(Map json) => PokemonListModel(
57 | id: json["id"],
58 | orderId: json["orderID"],
59 | nDex: json["nDex"],
60 | name: json["name"],
61 | type1: json["type1"],
62 | type2: json["type2"],
63 | ability1: json["ability1"],
64 | ability2: json["ability2"],
65 | hiddenability: json["hiddenability"],
66 | hp: json["hp"],
67 | atk: json["atk"],
68 | def: json["def"],
69 | spatk: json["spatk"],
70 | spdef: json["spdef"],
71 | spe: json["spe"],
72 | note: json["note"],
73 | tier: json["tier"],
74 | image: json["image"],
75 | );
76 |
77 | Map toJson() => {
78 | "id": id,
79 | "orderID": orderId,
80 | "nDex": nDex,
81 | "name": name,
82 | "type1": type1,
83 | "type2": type2,
84 | "ability1": ability1,
85 | "ability2": ability2,
86 | "hiddenability": hiddenability,
87 | "hp": hp,
88 | "atk": atk,
89 | "def": def,
90 | "spatk": spatk,
91 | "spdef": spdef,
92 | "spe": spe,
93 | "note": note,
94 | "tier": tier,
95 | "image": image,
96 | };
97 | }
98 |
--------------------------------------------------------------------------------
/lib/model/pokemonMoves.dart:
--------------------------------------------------------------------------------
1 | // To parse this JSON data, do
2 | //
3 | // final pokemonMoves = pokemonMovesFromJson(jsonString);
4 |
5 | import 'dart:convert';
6 |
7 | PokemonMoves pokemonMovesFromJson(String str) => PokemonMoves.fromJson(json.decode(str));
8 |
9 | String pokemonMovesToJson(PokemonMoves data) => json.encode(data.toJson());
10 |
11 | class PokemonMoves {
12 | int accuracy;
13 | ContestCombos contestCombos;
14 | ContestEffect contestEffect;
15 | ContestType contestType;
16 | ContestType damageClass;
17 | dynamic effectChance;
18 | List effectChanges;
19 | List effectEntries;
20 | List flavorTextEntries;
21 | ContestType generation;
22 | int id;
23 | List machines;
24 | Meta meta;
25 | String name;
26 | List names;
27 | List pastValues;
28 | int power;
29 | int pp;
30 | int priority;
31 | List statChanges;
32 | ContestEffect superContestEffect;
33 | ContestType target;
34 | ContestType type;
35 |
36 | PokemonMoves({
37 | this.accuracy,
38 | this.contestCombos,
39 | this.contestEffect,
40 | this.contestType,
41 | this.damageClass,
42 | this.effectChance,
43 | this.effectChanges,
44 | this.effectEntries,
45 | this.flavorTextEntries,
46 | this.generation,
47 | this.id,
48 | this.machines,
49 | this.meta,
50 | this.name,
51 | this.names,
52 | this.pastValues,
53 | this.power,
54 | this.pp,
55 | this.priority,
56 | this.statChanges,
57 | this.superContestEffect,
58 | this.target,
59 | this.type,
60 | });
61 |
62 | factory PokemonMoves.fromJson(Map json) => PokemonMoves(
63 | accuracy: json["accuracy"],
64 | contestCombos: ContestCombos.fromJson(json["contest_combos"]),
65 | contestEffect: ContestEffect.fromJson(json["contest_effect"]),
66 | contestType: ContestType.fromJson(json["contest_type"]),
67 | damageClass: ContestType.fromJson(json["damage_class"]),
68 | effectChance: json["effect_chance"],
69 | effectChanges: List.from(json["effect_changes"].map((x) => x)),
70 | effectEntries: List.from(json["effect_entries"].map((x) => EffectEntry.fromJson(x))),
71 | flavorTextEntries: List.from(json["flavor_text_entries"].map((x) => FlavorTextEntry.fromJson(x))),
72 | generation: ContestType.fromJson(json["generation"]),
73 | id: json["id"],
74 | machines: List.from(json["machines"].map((x) => x)),
75 | meta: Meta.fromJson(json["meta"]),
76 | name: json["name"],
77 | names: List.from(json["names"].map((x) => Name.fromJson(x))),
78 | pastValues: List.from(json["past_values"].map((x) => x)),
79 | power: json["power"],
80 | pp: json["pp"],
81 | priority: json["priority"],
82 | statChanges: List.from(json["stat_changes"].map((x) => x)),
83 | superContestEffect: ContestEffect.fromJson(json["super_contest_effect"]),
84 | target: ContestType.fromJson(json["target"]),
85 | type: ContestType.fromJson(json["type"]),
86 | );
87 |
88 | Map toJson() => {
89 | "accuracy": accuracy,
90 | "contest_combos": contestCombos.toJson(),
91 | "contest_effect": contestEffect.toJson(),
92 | "contest_type": contestType.toJson(),
93 | "damage_class": damageClass.toJson(),
94 | "effect_chance": effectChance,
95 | "effect_changes": List.from(effectChanges.map((x) => x)),
96 | "effect_entries": List.from(effectEntries.map((x) => x.toJson())),
97 | "flavor_text_entries": List.from(flavorTextEntries.map((x) => x.toJson())),
98 | "generation": generation.toJson(),
99 | "id": id,
100 | "machines": List.from(machines.map((x) => x)),
101 | "meta": meta.toJson(),
102 | "name": name,
103 | "names": List.from(names.map((x) => x.toJson())),
104 | "past_values": List.from(pastValues.map((x) => x)),
105 | "power": power,
106 | "pp": pp,
107 | "priority": priority,
108 | "stat_changes": List.from(statChanges.map((x) => x)),
109 | "super_contest_effect": superContestEffect.toJson(),
110 | "target": target.toJson(),
111 | "type": type.toJson(),
112 | };
113 | }
114 |
115 | class ContestCombos {
116 | Normal normal;
117 | Normal contestCombosSuper;
118 |
119 | ContestCombos({
120 | this.normal,
121 | this.contestCombosSuper,
122 | });
123 |
124 | factory ContestCombos.fromJson(Map json) => ContestCombos(
125 | normal: Normal.fromJson(json["normal"]),
126 | contestCombosSuper: Normal.fromJson(json["super"]),
127 | );
128 |
129 | Map toJson() => {
130 | "normal": normal.toJson(),
131 | "super": contestCombosSuper.toJson(),
132 | };
133 | }
134 |
135 | class Normal {
136 | List useAfter;
137 | List useBefore;
138 |
139 | Normal({
140 | this.useAfter,
141 | this.useBefore,
142 | });
143 |
144 | factory Normal.fromJson(Map json) => Normal(
145 | useAfter: json["use_after"] == null ? null : List.from(json["use_after"].map((x) => ContestType.fromJson(x))),
146 | useBefore: json["use_before"] == null ? null : List.from(json["use_before"].map((x) => ContestType.fromJson(x))),
147 | );
148 |
149 | Map toJson() => {
150 | "use_after": useAfter == null ? null : List.from(useAfter.map((x) => x.toJson())),
151 | "use_before": useBefore == null ? null : List.from(useBefore.map((x) => x.toJson())),
152 | };
153 | }
154 |
155 | class ContestType {
156 | String name;
157 | String url;
158 |
159 | ContestType({
160 | this.name,
161 | this.url,
162 | });
163 |
164 | factory ContestType.fromJson(Map json) => ContestType(
165 | name: json["name"],
166 | url: json["url"],
167 | );
168 |
169 | Map toJson() => {
170 | "name": name,
171 | "url": url,
172 | };
173 | }
174 |
175 | class ContestEffect {
176 | String url;
177 |
178 | ContestEffect({
179 | this.url,
180 | });
181 |
182 | factory ContestEffect.fromJson(Map json) => ContestEffect(
183 | url: json["url"],
184 | );
185 |
186 | Map toJson() => {
187 | "url": url,
188 | };
189 | }
190 |
191 | class EffectEntry {
192 | String effect;
193 | ContestType language;
194 | String shortEffect;
195 |
196 | EffectEntry({
197 | this.effect,
198 | this.language,
199 | this.shortEffect,
200 | });
201 |
202 | factory EffectEntry.fromJson(Map json) => EffectEntry(
203 | effect: json["effect"],
204 | language: ContestType.fromJson(json["language"]),
205 | shortEffect: json["short_effect"],
206 | );
207 |
208 | Map toJson() => {
209 | "effect": effect,
210 | "language": language.toJson(),
211 | "short_effect": shortEffect,
212 | };
213 | }
214 |
215 | class FlavorTextEntry {
216 | String flavorText;
217 | ContestType language;
218 | ContestType versionGroup;
219 |
220 | FlavorTextEntry({
221 | this.flavorText,
222 | this.language,
223 | this.versionGroup,
224 | });
225 |
226 | factory FlavorTextEntry.fromJson(Map json) => FlavorTextEntry(
227 | flavorText: json["flavor_text"],
228 | language: ContestType.fromJson(json["language"]),
229 | versionGroup: ContestType.fromJson(json["version_group"]),
230 | );
231 |
232 | Map toJson() => {
233 | "flavor_text": flavorText,
234 | "language": language.toJson(),
235 | "version_group": versionGroup.toJson(),
236 | };
237 | }
238 |
239 | class Meta {
240 | ContestType ailment;
241 | int ailmentChance;
242 | ContestType category;
243 | int critRate;
244 | int drain;
245 | int flinchChance;
246 | int healing;
247 | dynamic maxHits;
248 | dynamic maxTurns;
249 | dynamic minHits;
250 | dynamic minTurns;
251 | int statChance;
252 |
253 | Meta({
254 | this.ailment,
255 | this.ailmentChance,
256 | this.category,
257 | this.critRate,
258 | this.drain,
259 | this.flinchChance,
260 | this.healing,
261 | this.maxHits,
262 | this.maxTurns,
263 | this.minHits,
264 | this.minTurns,
265 | this.statChance,
266 | });
267 |
268 | factory Meta.fromJson(Map json) => Meta(
269 | ailment: ContestType.fromJson(json["ailment"]),
270 | ailmentChance: json["ailment_chance"],
271 | category: ContestType.fromJson(json["category"]),
272 | critRate: json["crit_rate"],
273 | drain: json["drain"],
274 | flinchChance: json["flinch_chance"],
275 | healing: json["healing"],
276 | maxHits: json["max_hits"],
277 | maxTurns: json["max_turns"],
278 | minHits: json["min_hits"],
279 | minTurns: json["min_turns"],
280 | statChance: json["stat_chance"],
281 | );
282 |
283 | Map toJson() => {
284 | "ailment": ailment.toJson(),
285 | "ailment_chance": ailmentChance,
286 | "category": category.toJson(),
287 | "crit_rate": critRate,
288 | "drain": drain,
289 | "flinch_chance": flinchChance,
290 | "healing": healing,
291 | "max_hits": maxHits,
292 | "max_turns": maxTurns,
293 | "min_hits": minHits,
294 | "min_turns": minTurns,
295 | "stat_chance": statChance,
296 | };
297 | }
298 |
299 | class Name {
300 | ContestType language;
301 | String name;
302 |
303 | Name({
304 | this.language,
305 | this.name,
306 | });
307 |
308 | factory Name.fromJson(Map json) => Name(
309 | language: ContestType.fromJson(json["language"]),
310 | name: json["name"],
311 | );
312 |
313 | Map toJson() => {
314 | "language": language.toJson(),
315 | "name": name,
316 | };
317 | }
318 |
--------------------------------------------------------------------------------
/lib/model/pokemonSpecies.dart:
--------------------------------------------------------------------------------
1 | // To parse this JSON data, do
2 | //
3 | // final pokemonSpecies = pokemonSpeciesFromJson(jsonString);
4 |
5 | import 'dart:convert';
6 |
7 | PokemonSpecies pokemonSpeciesFromJson(String str) => PokemonSpecies.fromJson(json.decode(str));
8 |
9 | String pokemonSpeciesToJson(PokemonSpecies data) => json.encode(data.toJson());
10 |
11 | class PokemonSpecies {
12 | int baseHappiness;
13 | int captureRate;
14 | NameLinkModel color;
15 | List eggGroups;
16 | EvolutionChain evolutionChain;
17 | dynamic evolvesFromSpecies;
18 | List flavorTextEntries;
19 | List formDescriptions;
20 | bool formsSwitchable;
21 | int genderRate;
22 | List genera;
23 | NameLinkModel generation;
24 | NameLinkModel growthRate;
25 | NameLinkModel habitat;
26 | bool hasGenderDifferences;
27 | int hatchCounter;
28 | int id;
29 | bool isBaby;
30 | String name;
31 | List names;
32 | int order;
33 | List palParkEncounters;
34 | List pokedexNumbers;
35 | NameLinkModel shape;
36 | List varieties;
37 |
38 | PokemonSpecies({
39 | this.baseHappiness,
40 | this.captureRate,
41 | this.color,
42 | this.eggGroups,
43 | this.evolutionChain,
44 | this.evolvesFromSpecies,
45 | this.flavorTextEntries,
46 | this.formDescriptions,
47 | this.formsSwitchable,
48 | this.genderRate,
49 | this.genera,
50 | this.generation,
51 | this.growthRate,
52 | this.habitat,
53 | this.hasGenderDifferences,
54 | this.hatchCounter,
55 | this.id,
56 | this.isBaby,
57 | this.name,
58 | this.names,
59 | this.order,
60 | this.palParkEncounters,
61 | this.pokedexNumbers,
62 | this.shape,
63 | this.varieties,
64 | });
65 |
66 | factory PokemonSpecies.fromJson(Map json) => PokemonSpecies(
67 | baseHappiness: json["base_happiness"],
68 | captureRate: json["capture_rate"],
69 | color: NameLinkModel.fromJson(json["color"]),
70 | eggGroups: List.from(json["egg_groups"].map((x) => NameLinkModel.fromJson(x))),
71 | evolutionChain: EvolutionChain.fromJson(json["evolution_chain"]),
72 | evolvesFromSpecies: json["evolves_from_species"],
73 | flavorTextEntries: List.from(json["flavor_text_entries"].map((x) => FlavorTextEntry.fromJson(x))),
74 | formDescriptions: List.from(json["form_descriptions"].map((x) => x)),
75 | formsSwitchable: json["forms_switchable"],
76 | genderRate: json["gender_rate"],
77 | genera: List.from(json["genera"].map((x) => Genus.fromJson(x))),
78 | generation: NameLinkModel.fromJson(json["generation"]),
79 | growthRate: NameLinkModel.fromJson(json["growth_rate"]),
80 | habitat: NameLinkModel.fromJson(json["habitat"]),
81 | hasGenderDifferences: json["has_gender_differences"],
82 | hatchCounter: json["hatch_counter"],
83 | id: json["id"],
84 | isBaby: json["is_baby"],
85 | name: json["name"],
86 | names: List.from(json["names"].map((x) => Name.fromJson(x))),
87 | order: json["order"],
88 | palParkEncounters: List.from(json["pal_park_encounters"].map((x) => PalParkEncounter.fromJson(x))),
89 | pokedexNumbers: List.from(json["pokedex_numbers"].map((x) => PokedexNumber.fromJson(x))),
90 | shape: NameLinkModel.fromJson(json["shape"]),
91 | varieties: List.from(json["varieties"].map((x) => Variety.fromJson(x))),
92 | );
93 |
94 | Map toJson() => {
95 | "base_happiness": baseHappiness,
96 | "capture_rate": captureRate,
97 | "color": color.toJson(),
98 | "egg_groups": List.from(eggGroups.map((x) => x.toJson())),
99 | "evolution_chain": evolutionChain.toJson(),
100 | "evolves_from_species": evolvesFromSpecies,
101 | "flavor_text_entries": List.from(flavorTextEntries.map((x) => x.toJson())),
102 | "form_descriptions": List.from(formDescriptions.map((x) => x)),
103 | "forms_switchable": formsSwitchable,
104 | "gender_rate": genderRate,
105 | "genera": List.from(genera.map((x) => x.toJson())),
106 | "generation": generation.toJson(),
107 | "growth_rate": growthRate.toJson(),
108 | "habitat": habitat.toJson(),
109 | "has_gender_differences": hasGenderDifferences,
110 | "hatch_counter": hatchCounter,
111 | "id": id,
112 | "is_baby": isBaby,
113 | "name": name,
114 | "names": List.from(names.map((x) => x.toJson())),
115 | "order": order,
116 | "pal_park_encounters": List.from(palParkEncounters.map((x) => x.toJson())),
117 | "pokedex_numbers": List.from(pokedexNumbers.map((x) => x.toJson())),
118 | "shape": shape.toJson(),
119 | "varieties": List.from(varieties.map((x) => x.toJson())),
120 | };
121 | }
122 |
123 | class NameLinkModel {
124 | String name;
125 | String url;
126 |
127 | NameLinkModel({
128 | this.name,
129 | this.url,
130 | });
131 |
132 | factory NameLinkModel.fromJson(Map json) => NameLinkModel(
133 | name: json["name"],
134 | url: json["url"],
135 | );
136 |
137 | Map toJson() => {
138 | "name": name,
139 | "url": url,
140 | };
141 | }
142 |
143 | class EvolutionChain {
144 | String url;
145 |
146 | EvolutionChain({
147 | this.url,
148 | });
149 |
150 | factory EvolutionChain.fromJson(Map json) => EvolutionChain(
151 | url: json["url"],
152 | );
153 |
154 | Map toJson() => {
155 | "url": url,
156 | };
157 | }
158 |
159 | class FlavorTextEntry {
160 | String flavorText;
161 | NameLinkModel language;
162 | NameLinkModel version;
163 |
164 | FlavorTextEntry({
165 | this.flavorText,
166 | this.language,
167 | this.version,
168 | });
169 |
170 | factory FlavorTextEntry.fromJson(Map json) => FlavorTextEntry(
171 | flavorText: json["flavor_text"],
172 | language: NameLinkModel.fromJson(json["language"]),
173 | version: NameLinkModel.fromJson(json["version"]),
174 | );
175 |
176 | Map toJson() => {
177 | "flavor_text": flavorText,
178 | "language": language.toJson(),
179 | "version": version.toJson(),
180 | };
181 | }
182 |
183 | class Genus {
184 | String genus;
185 | NameLinkModel language;
186 |
187 | Genus({
188 | this.genus,
189 | this.language,
190 | });
191 |
192 | factory Genus.fromJson(Map json) => Genus(
193 | genus: json["genus"],
194 | language: NameLinkModel.fromJson(json["language"]),
195 | );
196 |
197 | Map toJson() => {
198 | "genus": genus,
199 | "language": language.toJson(),
200 | };
201 | }
202 |
203 | class Name {
204 | NameLinkModel language;
205 | String name;
206 |
207 | Name({
208 | this.language,
209 | this.name,
210 | });
211 |
212 | factory Name.fromJson(Map json) => Name(
213 | language: NameLinkModel.fromJson(json["language"]),
214 | name: json["name"],
215 | );
216 |
217 | Map toJson() => {
218 | "language": language.toJson(),
219 | "name": name,
220 | };
221 | }
222 |
223 | class PalParkEncounter {
224 | NameLinkModel area;
225 | int baseScore;
226 | int rate;
227 |
228 | PalParkEncounter({
229 | this.area,
230 | this.baseScore,
231 | this.rate,
232 | });
233 |
234 | factory PalParkEncounter.fromJson(Map json) => PalParkEncounter(
235 | area: NameLinkModel.fromJson(json["area"]),
236 | baseScore: json["base_score"],
237 | rate: json["rate"],
238 | );
239 |
240 | Map toJson() => {
241 | "area": area.toJson(),
242 | "base_score": baseScore,
243 | "rate": rate,
244 | };
245 | }
246 |
247 | class PokedexNumber {
248 | int entryNumber;
249 | NameLinkModel pokedex;
250 |
251 | PokedexNumber({
252 | this.entryNumber,
253 | this.pokedex,
254 | });
255 |
256 | factory PokedexNumber.fromJson(Map json) => PokedexNumber(
257 | entryNumber: json["entry_number"],
258 | pokedex: NameLinkModel.fromJson(json["pokedex"]),
259 | );
260 |
261 | Map toJson() => {
262 | "entry_number": entryNumber,
263 | "pokedex": pokedex.toJson(),
264 | };
265 | }
266 |
267 | class Variety {
268 | bool isDefault;
269 | NameLinkModel pokemon;
270 |
271 | Variety({
272 | this.isDefault,
273 | this.pokemon,
274 | });
275 |
276 | factory Variety.fromJson(Map json) => Variety(
277 | isDefault: json["is_default"],
278 | pokemon: NameLinkModel.fromJson(json["pokemon"]),
279 | );
280 |
281 | Map toJson() => {
282 | "is_default": isDefault,
283 | "pokemon": pokemon.toJson(),
284 | };
285 | }
286 |
--------------------------------------------------------------------------------
/lib/pages/PokemonList/widget/generationModel.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../../../helper/colorTheme.dart';
3 | import '../../../widgets/customWidget.dart';
4 | class GenerationModel extends StatelessWidget {
5 | const GenerationModel({Key key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return DraggableScrollableSheet(
10 | maxChildSize: .6,
11 | initialChildSize: .48,
12 | minChildSize: .3,
13 | builder: (context,scrollController){
14 | return Container(
15 | width: fullWidth(context),
16 | child: Container(
17 | width: fullWidth(context),
18 | margin: EdgeInsets.only(top: getFontSize(context, 30)),
19 | decoration: BoxDecoration(
20 | borderRadius: BorderRadius.only(topLeft: Radius.circular(20),topRight: Radius.circular(20)),
21 | color: Colors.white
22 | ),
23 | child: Column(
24 | children: [
25 | Container(
26 | margin: EdgeInsets.only(top:10),
27 | width: fullWidth(context) * .3,
28 | height: 3,
29 | decoration: BoxDecoration(
30 | borderRadius: BorderRadius.all(Radius.circular(10)),
31 | color: AppColors.pokeballColor
32 | ),
33 | ),
34 | SizedBox(height: 20,),
35 | Text('Generation', style: TextStyle(fontSize: 20,fontWeight: FontWeight.bold),),
36 | SizedBox(height: 10,),
37 | Expanded(
38 | child: GridView.builder(
39 | padding: EdgeInsets.all(20),
40 | controller: scrollController,
41 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
42 | crossAxisCount: 2,
43 | childAspectRatio: 1.55,
44 | crossAxisSpacing: 10,
45 | mainAxisSpacing: 10,
46 | ),
47 | itemCount: 6,
48 | itemBuilder: (context, index) => _generations(context,index),
49 | ),
50 | ),
51 | ],
52 | ),
53 | ),
54 |
55 | );
56 | },
57 | );
58 | }
59 | Widget _generations(BuildContext context,int index){
60 | String generation;
61 | switch (index) {
62 | case 0: generation = "I"; break;
63 | case 1: generation = "II"; break;
64 | case 2: generation = "III"; break;
65 | case 3: generation = "IV"; break;
66 | case 4: generation = "V"; break;
67 | case 5: generation = "VI"; break;
68 | default:generation = "I"; break;
69 | }
70 | return Container(
71 | margin:EdgeInsets.symmetric(horizontal: 0,vertical: 0) ,
72 | padding: EdgeInsets.symmetric(horizontal: 10,vertical: 20),
73 | decoration: BoxDecoration(
74 | color: Colors.white,
75 | borderRadius: BorderRadius.all(Radius.circular(15)),
76 | boxShadow: [
77 | BoxShadow(blurRadius: 10,offset: Offset(2, 5),color: Color(0xfff4f4f4),spreadRadius:10),
78 | ],
79 | ),
80 | child: Column(
81 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
82 | children: [
83 | Text('Generation $generation', style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold),),
84 | Row(
85 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
86 | children: [
87 | Image.asset('assets/images/pokimon_4.png',height: getDimention(context, 50),),
88 | Image.asset('assets/images/pokimon_26.png',height: getDimention(context, 50),),
89 | Image.asset('assets/images/pokimon_5.png',height: getDimention(context, 50),),
90 |
91 | ],)
92 | ],
93 | ),
94 | );
95 | }
96 | }
--------------------------------------------------------------------------------
/lib/pages/PokemonList/widget/pokemonCard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../../../helper/colorTheme.dart';
3 | import '../../../model/pokemonList.dart';
4 | import '../../../widgets/customWidget.dart';
5 |
6 | class PokemonCard extends StatelessWidget {
7 | const PokemonCard({Key key, this.model, this.onPressed, this.onLongPressed})
8 | : super(key: key);
9 |
10 | final PokemonListModel model;
11 | final Function onLongPressed;
12 | final Function onPressed;
13 |
14 | Widget _pokemonTypeWidget(BuildContext context, String type, Color color) {
15 | if (type == null || type.isEmpty) {
16 | return SizedBox();
17 | } else {
18 | return Container(
19 | padding: EdgeInsets.symmetric(vertical: 1, horizontal: 5),
20 | decoration: BoxDecoration(
21 | borderRadius: BorderRadius.circular(10),
22 | color: color,
23 | ),
24 | child: Text(
25 | type,
26 | style: TextStyle(
27 | color: Colors.white60,
28 | fontSize: getFontSize(context, 10),
29 | fontWeight: FontWeight.w600),
30 | ),
31 | );
32 | }
33 | }
34 |
35 | String getId(String id) {
36 | return '#' +
37 | (id.toString().length == 1
38 | ? '00' + id.toString()
39 | : id.toString().length == 2 ? '0' + id.toString() : id.toString());
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return InkWell(
45 | onTap: onPressed,
46 | onLongPress: onLongPressed,
47 | child: Container(
48 | margin: EdgeInsets.only(left: 0, right: 0, top: 0, bottom: 0),
49 | decoration: BoxDecoration(
50 | color: setprimaryColor(model.type1),
51 | borderRadius: BorderRadius.circular(10)),
52 | child: Stack(
53 | children: [
54 | ///[Pokemon ID]
55 | Positioned(
56 | bottom: getDimention(context, 10),
57 | left: getDimention(context, 10),
58 | child: customText(getId(model.orderId.toString()),
59 | style: TextStyle(
60 | color: setSecondaryColor(model.type1),
61 | fontSize: getFontSize(context, 12),
62 | fontWeight: FontWeight.w600),
63 | overflow: TextOverflow.ellipsis),
64 | ),
65 |
66 | ///[Pokeball]
67 | Positioned(
68 | bottom: 0,
69 | right: 0,
70 | height: getDimention(context, 80),
71 | child: Image.asset(
72 | 'assets/images/pokeball.png',
73 | color: setSecondaryColor('#' + model.type1),
74 | height: getDimention(context, 150),
75 | )),
76 |
77 | /// [Name, Type]
78 | Positioned(
79 | top: getDimention(context, 20),
80 | left: getDimention(context, 10),
81 | child: Column(
82 | crossAxisAlignment: CrossAxisAlignment.start,
83 | children: [
84 | Container(
85 | width: fullWidth(context) * .3,
86 | child: customText(model.name,
87 | context: context,
88 | style: TextStyle(
89 | color: Colors.white,
90 | fontSize: getFontSize(context, 14),
91 | fontWeight: FontWeight.w600,
92 | ),
93 | overflow: TextOverflow.ellipsis,
94 | textAlign: TextAlign.start),
95 | ),
96 | _pokemonTypeWidget(
97 | context, model.type1, setSecondaryColor(model.type1)),
98 | SizedBox(
99 | height: 5,
100 | ),
101 | _pokemonTypeWidget(
102 | context, model.type2, setSecondaryColor(model.type1)),
103 | ],
104 | )),
105 |
106 | /// [Image]
107 | Positioned(
108 | bottom: 10,
109 | right: 10,
110 | child: Hero(
111 | tag: model.orderId,
112 | child: Image(
113 | image: customAdvanceNetworkImage(
114 | model.image,
115 | ),
116 | fit: BoxFit.contain,
117 | height: getDimention(context, 70),
118 | ),
119 | )
120 | )
121 | ],
122 | )
123 | ),
124 | );
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/lib/pages/PokemonList/widget/pokemonCard3.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../../../helper/colorTheme.dart';
3 | import '../../../model/pokemonList.dart';
4 | import '../../../widgets/customWidget.dart';
5 |
6 | class PokemonCard3 extends StatelessWidget {
7 | const PokemonCard3({Key key, this.model, this.onPressed, this.onLongPressed})
8 | : super(key: key);
9 |
10 | final PokemonListModel model;
11 | final Function onLongPressed;
12 | final Function onPressed;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return InkWell(
17 | onTap: onPressed,
18 | onLongPress: onLongPressed,
19 | child: Container(
20 | height: 40,
21 | decoration: BoxDecoration(
22 | color: setprimaryColor(model.type1),
23 | borderRadius: BorderRadius.circular(10)),
24 | child: Hero(
25 | tag: model.orderId,
26 | child: Image(
27 | image: customAdvanceNetworkImage(
28 | model.image,
29 | ),
30 | fit: BoxFit.contain,
31 | height: getDimention(context, 30),
32 | ),
33 | ),
34 | )
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/pages/PokemonList/widget/pokemonCard_2.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../helper/colorTheme.dart';
4 | import '../../../model/pokemonList.dart';
5 | import '../../../widgets/customWidget.dart';
6 |
7 | class PokemonCard2 extends StatelessWidget {
8 | const PokemonCard2({Key key, this.model, this.onPressed, this.onLongPressed})
9 | : super(key: key);
10 |
11 | final PokemonListModel model;
12 | final Function onLongPressed;
13 | final Function onPressed;
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return InkWell(
18 | onTap: onPressed,
19 | onLongPress: onLongPressed,
20 | child: Container(
21 | decoration: BoxDecoration(
22 | color: setprimaryColor(model.type1),
23 | borderRadius: BorderRadius.circular(10)),
24 | child: Stack(
25 | children: [
26 | Positioned(
27 | bottom: 0,
28 | right: 0,
29 | height: getDimention(context, 110),
30 | child: Image.asset(
31 | 'assets/images/pokeball.png',
32 | color: setSecondaryColor('#' + model.type1),
33 | )),
34 | Positioned(
35 | bottom: 10,
36 | right: 10,
37 | child: Hero(
38 | tag: model.orderId,
39 | child: Image(
40 | image: customAdvanceNetworkImage(
41 | model.image,
42 | ),
43 | fit: BoxFit.contain,
44 | height: getDimention(context, 100),
45 | ),
46 | ))
47 | ],
48 | )
49 | ),
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/pages/Types/Details/moveDetailPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class MoveDetailPage extends StatefulWidget {
4 | MoveDetailPage({Key key}) : super(key: key);
5 |
6 | @override
7 | _MoveDetailPageState createState() => _MoveDetailPageState();
8 | }
9 |
10 | class _MoveDetailPageState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Container(
14 |
15 | );
16 | }
17 | }
--------------------------------------------------------------------------------
/lib/pages/Types/pokemonMovesPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutte_pokedex/helper/enum.dart';
2 | import 'package:flutte_pokedex/scoped_model/moveState.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:provider/provider.dart';
5 |
6 | import '../../helper/colorTheme.dart';
7 | import '../../widgets/customWidget.dart';
8 | import '../../widgets/customWidget.dart';
9 |
10 | class PokemonMovesPage extends StatefulWidget {
11 | final HomePageButtonEnum pagetype;
12 | PokemonMovesPage({Key key,this.pagetype}) : super(key: key);
13 |
14 | @override
15 | _PokemonMovesPageState createState() => _PokemonMovesPageState();
16 | }
17 |
18 | class _PokemonMovesPageState extends State with TickerProviderStateMixin {
19 | ScrollController _scrollController;
20 | AnimationController _controller;
21 | Color primary;
22 | Color secondary;
23 |
24 | @override
25 | void initState() {
26 | setColor();
27 | _controller = AnimationController(
28 | vsync: this, duration: Duration(milliseconds: 4000));
29 | _controller.repeat();
30 | var state = Provider.of(context,listen: false);
31 | state.getMovesList(widget.pagetype);
32 | _scrollController = ScrollController()
33 | ..addListener(_scrollListner);
34 | super.initState();
35 |
36 | }
37 | @override
38 | void dispose() {
39 | _scrollController.dispose();
40 | _controller.dispose();
41 | super.dispose();
42 | }
43 | _scrollListner(){
44 | if (_scrollController.position.pixels == _scrollController.position.maxScrollExtent) {
45 | var state = Provider.of(context,listen: false);
46 | print('reached to bottom');
47 | state.getMovesList(widget.pagetype,initialLoad: false);
48 | }
49 | }
50 | Widget _topRightPokeball() {
51 | return Positioned(
52 | right: 0,
53 | top: 0,
54 | child: Align(
55 | heightFactor: fullWidth(context) <= 360 ? getDimention(context, 1.03) : .74,
56 | widthFactor: fullWidth(context) <= 360 ? getDimention(context,.98) : .69,
57 | alignment: Alignment.bottomLeft,
58 | child: RotationTransition(
59 | turns: Tween(begin: 0.0, end: 1.0).animate(_controller),
60 | child:Image.asset(
61 | 'assets/images/pokeball.png',
62 | color: primary.withAlpha(150),
63 | height: getDimention(context, 250),
64 | ),)));
65 | }
66 | Widget _body(){
67 | var state = Provider.of(context);
68 | if(state.movesList == null){
69 | return SliverToBoxAdapter(
70 | child: Container(
71 | height: fullHeight(context) - 150,
72 | child: Center(child: CircularProgressIndicator(
73 | backgroundColor:primary,
74 | // valueColor: AlwaysStoppedAnimation(secondary),
75 | ),),
76 | ),
77 | );
78 | }
79 | else{
80 | return SliverGrid(
81 | // physics: NeverScrollableScrollPhysics(),
82 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
83 | crossAxisCount: 3,
84 | crossAxisSpacing: 0,
85 | mainAxisSpacing: 0,
86 | childAspectRatio: 2.5
87 | ),
88 | delegate:SliverChildListDelegate.fixed(
89 | state.movesList.map((x){
90 | var color = primary ; //getRendomColor(state.movesList.indexOf(x));
91 | return Container(
92 | margin: EdgeInsets.symmetric(horizontal: 5,vertical: 5),
93 | padding: EdgeInsets.symmetric(horizontal: 5,vertical: 10),
94 | alignment: Alignment.center,
95 | decoration: BoxDecoration(
96 | borderRadius: BorderRadius.all(Radius.circular(5)),
97 | color: color,//setprimaryColor(widget.type).withAlpha(150),
98 | boxShadow: [
99 | // BoxShadow(blurRadius: 5,offset: Offset(0, -5),color: color.withAlpha(150),spreadRadius:0),
100 | ],
101 | ),
102 | child: Text(x.name.toUpperCase(),overflow:TextOverflow.ellipsis,
103 | style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),
104 | ),
105 | );
106 | }).toList()
107 | ) ,
108 | );
109 | }
110 | }
111 | Widget _title(){
112 | String title;
113 | switch (widget.pagetype) {
114 | case HomePageButtonEnum.Abilitie: title = 'Abilities';break;
115 | case HomePageButtonEnum.Move: title = 'Move';break;
116 | case HomePageButtonEnum.Item: title = 'Items';break;
117 | case HomePageButtonEnum.Berries: title = 'Berries';break;
118 | case HomePageButtonEnum.Pokemon: title = 'Pokemons';break;
119 | case HomePageButtonEnum.Habitats: title = 'Habitats';break;
120 |
121 | break;
122 | default : title = '';
123 | }
124 | return Container(
125 | padding: EdgeInsets.symmetric(horizontal: 50,vertical: 10),
126 | alignment: Alignment.bottomLeft,
127 | child: Text(title, style: TextStyle(color: Colors.black54,fontSize: getFontSize(context,35), fontWeight: FontWeight.w900),),
128 | );
129 | }
130 |
131 | setColor(){
132 |
133 | switch (widget.pagetype) {
134 | case HomePageButtonEnum.Abilitie: {
135 | primary = Color(0xff4dc2a6);secondary = Color(0xff65d4bc);
136 | break;
137 | }
138 | case HomePageButtonEnum.Berries: {
139 | primary=Color(0xff7b528c);secondary= Color(0xff9569a5);
140 | break;
141 | }
142 | case HomePageButtonEnum.Habitats: {
143 | primary=Color(0xffb1726c);secondary = Color(0xffc1877e);
144 | break;
145 | }
146 | case HomePageButtonEnum.Item: {
147 | primary=Color(0xffffce4a);secondary = Color(0xffffd858);
148 | break;
149 | }
150 | case HomePageButtonEnum.Move: {
151 | primary=Color(0xfff77769);secondary = Color(0xfff88a7d);
152 | break;
153 | }
154 | case HomePageButtonEnum.Pokemon: {
155 | primary=Color(0xff4dc2a6);secondary= Color(0xff65d4bc);
156 | break;
157 | }
158 |
159 | default:
160 | }
161 | }
162 | @override
163 | Widget build(BuildContext context) {
164 | return Scaffold(
165 | backgroundColor: secondary,
166 | body: Stack(
167 | children: [
168 | _topRightPokeball(),
169 | CustomScrollView(
170 | controller: _scrollController,
171 | slivers: [
172 | SliverAppBar(
173 | automaticallyImplyLeading: true,
174 | leading: BackButton(color: Colors.black54,),
175 | backgroundColor: Colors.transparent,
176 | brightness: Brightness.dark,
177 | stretch: true,
178 | flexibleSpace:_title(),
179 | expandedHeight: getDimention(context, 130),
180 | ),
181 | _body(),
182 | ],
183 | ),
184 | ],
185 | )
186 | );
187 | }
188 | }
--------------------------------------------------------------------------------
/lib/pages/homePageBody.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutte_pokedex/helper/enum.dart';
2 | import 'package:flutte_pokedex/scoped_model/pokemonState.dart';
3 | import 'package:flutte_pokedex/widgets/customWidget.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:provider/provider.dart';
6 | import '../helper/colorTheme.dart';
7 | import '../widgets/customWidget.dart';
8 | import 'PokemonList/pokemonListPage.dart';
9 | import 'Types/pokemonMovesPage.dart';
10 |
11 | class HomePageBody extends StatefulWidget {
12 | _HomePageBodyState createState() => _HomePageBodyState();
13 | }
14 |
15 | class _HomePageBodyState extends State {
16 | bool isViewAll = false;
17 | double viewAllHeight = 0;
18 | bool isSearchFieldEnable = false;
19 | @override
20 | void initState() {
21 | super.initState();
22 | final state = Provider.of(context,listen: false);
23 | state.getPokemonListAsync();
24 | }
25 |
26 |
27 | Widget _getNewsTile(String image) {
28 | return ListTile(
29 | onTap: (){},
30 | title: Text(
31 | 'Pokemon rumble rush arives soon',
32 | style: TextStyle(fontSize: getFontSize(context,14), fontWeight: FontWeight.w500),
33 | ),
34 | subtitle: Text('10 May 2019',style: TextStyle(fontSize: getFontSize(context,12)),),
35 | trailing: Image.asset(
36 | image,
37 | ));
38 | }
39 |
40 | Widget _searchBox() {
41 | final state = Provider.of(context,);
42 | return InkWell(
43 | onTap: ()async{
44 | await showSearch(
45 | context: context,
46 | delegate: PokemonSearch(state.pokemonList));
47 | },
48 | child: Container(
49 | height: 40,
50 | padding: EdgeInsets.symmetric(horizontal: 15),
51 | margin: EdgeInsets.only(right: 30, top: 30,bottom: 20),
52 | decoration: BoxDecoration(
53 | color: Color(0xfff6f6f6), borderRadius: BorderRadius.circular(50)),
54 | child: Row(
55 | children: [
56 | Icon(Icons.search,color: Colors.grey.shade600),
57 | SizedBox(width: 10,),
58 | Text('Search Pokemon, Move, Ability',style: TextStyle(color: Colors.grey.shade600, fontSize: getFontSize(context,14)))
59 | ],
60 | )
61 | ),
62 | );
63 | }
64 |
65 | Widget _pokedexControlButtons(){
66 | return Column(
67 | children: [
68 | SizedBox(height: isViewAll ? 0 : 10,),
69 | _buttonRow('Pokedex','Moves',primary1:Color(0xff4dc2a6),secondary1: Color(0xff65d4bc),primary2:Color(0xfff77769),secondary2: Color(0xfff88a7d) ),
70 | _buttonRow('Abilities','Item',primary1:Color(0xff59a9f4),secondary1: Color(0xff6fc1f9),primary2:Color(0xffffce4a),secondary2: Color(0xffffd858) ),
71 | _buttonRow('Berries','Habitats',primary1:Color(0xff7b528c),secondary1: Color(0xff9569a5),primary2:Color(0xffb1726c),secondary2: Color(0xffc1877e) ),
72 | SizedBox(height: isViewAll ? 0 : 10,)
73 | ],
74 | );
75 | }
76 |
77 | Widget _buttonRow(String text1, String text2,{Color primary1,Color secondary1,Color primary2,Color secondary2}){
78 | return AnimatedContainer(
79 | curve: Curves.linear,
80 | duration: Duration(milliseconds: 300),
81 | height: isViewAll ? 0 : getDimention(context,78),
82 | child: Row(
83 | children: [
84 | _getCategoryCard(text1,primary1,secondary1),
85 | _getCategoryCard(text2, primary2,secondary2)
86 | ],
87 | ),
88 | );
89 | }
90 |
91 | _openPage(HomePageButtonEnum pageType){
92 | Navigator.of(context).push(
93 | MaterialPageRoute(
94 | builder: (context) => PokemonMovesPage(pagetype: pageType,)
95 | )
96 | );
97 | }
98 |
99 | Widget _getCategoryCard(String title, Color color, Color seondaryColor) {
100 | return InkWell(
101 | onTap: () {
102 | switch(title){
103 | case 'Moves' : _openPage(HomePageButtonEnum.Move); return;
104 | case 'Abilities' : _openPage(HomePageButtonEnum.Abilitie); return;
105 | case 'Item' : _openPage(HomePageButtonEnum.Item); return;
106 | case 'Habitats' : _openPage(HomePageButtonEnum.Habitats); return;
107 | case 'Berries' : _openPage(HomePageButtonEnum.Berries); return;
108 | default: Navigator.of(context).pushNamed('/pokemonList');
109 | }
110 |
111 | },
112 | child: Container(
113 | alignment: Alignment.center,
114 | margin: EdgeInsets.symmetric(vertical: 5, horizontal: 5),
115 | width: MediaQuery.of(context).size.width / 2 - 30,
116 | decoration: BoxDecoration(
117 | color: color, borderRadius: BorderRadius.circular(10),
118 | boxShadow: [
119 | BoxShadow(blurRadius: 10,offset: Offset(2, 5),color: color.withAlpha(100),spreadRadius:0),
120 | // BoxShadow(blurRadius: 8,offset: Offset(5,-2),color: Color(0xffffffff),spreadRadius:5)
121 | ],
122 | ),
123 | child:Stack(
124 | alignment: Alignment.topLeft,
125 | children: [
126 | Positioned(
127 | top: 0,
128 | left:0,
129 | child: Container(
130 | child: ClipRRect(
131 | borderRadius: BorderRadius.only(),
132 | child: Align(
133 | alignment: Alignment.topLeft,
134 | heightFactor: 1,
135 | widthFactor: 1,
136 | child: Container(
137 | height: 30,
138 | width: 30,
139 | decoration: BoxDecoration(
140 | color: seondaryColor,
141 | borderRadius: BorderRadius.only(
142 | topLeft: Radius.circular(10.0),
143 | topRight: Radius.circular(0.0),
144 | bottomRight: Radius.circular(40.0),
145 | bottomLeft: Radius.circular(0.0),
146 | )),
147 | )),
148 | ),
149 | ),
150 | ),
151 | Center(
152 | child: Padding(
153 | padding: EdgeInsets.only(right: 30),
154 | child: Text( title,style: TextStyle(color: Colors.white, fontSize: getFontSize(context,16),fontWeight: FontWeight.bold),),
155 | ),
156 | ),
157 | Container(
158 | alignment: Alignment.centerRight,
159 | child: ClipRRect(
160 | borderRadius: BorderRadius.only(
161 | topRight: Radius.circular(10),
162 | bottomRight: Radius.circular(10)),
163 | child: Transform.scale(
164 | scale: 1.2,
165 | child: Padding(
166 | padding: EdgeInsets.only(left: getDimention(context, 5)),
167 | child: Align(
168 | alignment: FractionalOffset.centerLeft,
169 | heightFactor: 1,
170 | widthFactor: .9,
171 | child: Image.asset(
172 | 'assets/images/pokeball.png',
173 | color: seondaryColor,
174 | fit: BoxFit.cover,
175 | ),),
176 | ),
177 | )
178 | ),
179 | ),
180 | ],
181 | ),
182 | ),
183 | );
184 | }
185 |
186 | Widget _pokemonNews() {
187 | return AnimatedContainer(
188 | curve: Curves.linearToEaseOut,
189 | duration: Duration(milliseconds: 300),
190 | height: isViewAll ? MediaQuery.of(context).size.height - getDimention(context, 300) : getDimention(context, 250) ,
191 | width: MediaQuery.of(context).size.width,
192 | alignment: Alignment.bottomCenter,
193 | child: ListView(
194 | physics: BouncingScrollPhysics(),
195 | children: [
196 | Row(
197 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
198 | children: [
199 | Padding(
200 | padding: EdgeInsets.only(left: 20,),
201 | child: Text(
202 | 'Pokemon News',
203 | style: TextStyle(fontSize: getFontSize(context,18), fontWeight: FontWeight.w800),
204 | ),
205 | ),
206 | FlatButton(
207 | child: Text(
208 | 'View All',
209 | style: TextStyle(fontSize: getFontSize(context,16), color: Color(0xff6c79dc)),
210 | ),
211 | onPressed: () {
212 | setState(() {
213 | isViewAll = !isViewAll;
214 | // viewAllHeight = isViewAll ? getDimention(context, 290) : 0;
215 | });
216 | },
217 | ),
218 | ]),
219 | _getNewsTile('assets/images/pokimon_1.png'),
220 | Divider(),
221 | _getNewsTile('assets/images/pokimon_2.png'),
222 | Divider(),
223 | _getNewsTile('assets/images/pokimon_3.png'),
224 | Divider(),
225 | _getNewsTile('assets/images/pokimon_4.png'),
226 | Divider(),
227 | _getNewsTile('assets/images/pokimon_5.png'),
228 | ],
229 | ),
230 | );
231 | }
232 |
233 | @override
234 | Widget build(BuildContext context) {
235 | return CustomScrollView(
236 | slivers: [
237 | SliverToBoxAdapter(
238 | key: Key('list'),
239 | child: Container(
240 | decoration: BoxDecoration(
241 | color: Colors.white,
242 | borderRadius: BorderRadius.only(
243 | bottomLeft: Radius.circular(30),
244 | bottomRight: Radius.circular(30))),
245 | width: MediaQuery.of(context).size.width,
246 | padding: EdgeInsets.fromLTRB(20, 0, 0, 20),
247 | child: Stack(
248 | children: [
249 | Positioned(
250 | right: 0,
251 | top: 0,
252 | child:
253 | Align(
254 | heightFactor: .75,
255 | widthFactor: .7,
256 | alignment: Alignment.bottomLeft,
257 | child: Hero(
258 | tag: "pokeball",
259 | child: Image.asset(
260 | 'assets/images/pokeball.png',
261 | color: AppColors.pokeballColor,
262 | height: getDimention(context,250),
263 | ),
264 | )
265 | )
266 | ),
267 | Container(
268 | padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
269 | margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top + 50),
270 | child: Column(
271 | mainAxisSize: MainAxisSize.min,
272 | mainAxisAlignment: MainAxisAlignment.start,
273 | crossAxisAlignment: CrossAxisAlignment.start,
274 | children: [
275 | Text('What pokemon',style: TextStyle(fontSize: getFontSize(context,30), fontWeight: FontWeight.w600),),
276 | Text('are you loking for ?',style: TextStyle(fontSize: getFontSize(context,30), fontWeight: FontWeight.w600),),
277 | _searchBox(),
278 | _pokedexControlButtons()
279 | // _pokemonNews()
280 | ],
281 | ),
282 | ),
283 | ],
284 | )),
285 | ),
286 | SliverToBoxAdapter(
287 | child: _pokemonNews(),
288 | )
289 | ],
290 | );
291 | }
292 | }
293 |
--------------------------------------------------------------------------------
/lib/pages/pokemonDetailPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:carousel_slider/carousel_slider.dart';
2 | import 'package:flutte_pokedex/helper/colorTheme.dart';
3 | import 'package:flutte_pokedex/model/pokemonList.dart';
4 | import 'package:flutte_pokedex/scoped_model/pokemonState.dart';
5 | import 'package:flutte_pokedex/widgets/customWidget.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter_tts/flutter_tts.dart';
8 | import 'package:provider/provider.dart';
9 | import 'package:sliding_up_panel/sliding_up_panel.dart';
10 |
11 | import 'pokemonDetails/about.dart';
12 | import 'pokemonDetails/baseState.dart';
13 | import 'pokemonDetails/moves.dart';
14 |
15 | class PokemonDetailPage extends StatefulWidget {
16 | PokemonDetailPage({this.name});
17 | final String name;
18 | // MainModel model;
19 | _PokemonDetailPageState createState() => _PokemonDetailPageState();
20 | }
21 |
22 | class _PokemonDetailPageState extends State
23 | with TickerProviderStateMixin {
24 | PokemonListModel model;
25 | double opacity = 0;
26 | int sliderPageno = 0;
27 | bool isFavourite = false;
28 | FlutterTts flutterTts ;
29 | List languages ;
30 | @override
31 | AnimationController _controller;
32 | AnimationController _progressController;
33 | Animation _progressAnimation;
34 |
35 | @override
36 | void dispose() {
37 | _controller.dispose();
38 | _stop();
39 | _progressController.dispose();
40 | super.dispose();
41 | }
42 |
43 | @override
44 | void initState() {
45 | flutterTts = new FlutterTts();
46 |
47 | final state = Provider.of(context,listen: false);
48 | model = state.pokemonList.firstWhere((x)=> x.name == widget.name);
49 | state.getPokemonSpeciesAsync(widget.name.toLowerCase().split(' ')[0]).then((val){
50 | _startSpeak();
51 | });
52 | state.getPokemonDetaiAsync(widget.name.toLowerCase().split(' ')[0]);
53 |
54 | _controller = AnimationController(
55 | vsync: this, duration: Duration(milliseconds: 4000));
56 | _controller.repeat();
57 | _progressController = AnimationController(
58 | duration: Duration(milliseconds: 4000), vsync: this);
59 | _progressAnimation =
60 | Tween(begin: 0.0, end: 1.0).animate(_progressController);
61 | _progressController.repeat();
62 | super.initState();
63 | }
64 | Future _speak(String name,String type, String description) async{
65 | print('voice start' + type);
66 | await flutterTts.speak(name + '\n \n' + type + '\n \n' + description);
67 | }
68 | Future _startSpeak()async{
69 | final state = Provider.of(context,listen: false);
70 | var list = state.pokemonSpecies.flavorTextEntries.where((x)=> x.language.name == 'en').toSet().toList();
71 | list = list.toSet().toList();
72 | list.forEach((x)=> x.flavorText..replaceAll("\n", " "));
73 | String desc = '';
74 | StringBuffer description = new StringBuffer();
75 |
76 | for(int i= 0; i< list.length ;i++){
77 | var it = list[i].flavorText.replaceAll("\n", " ");
78 | if(!desc.toString().toLowerCase().contains(it.toLowerCase())){
79 | description.write(it + ' ');
80 | desc += it+ ' ';
81 | }
82 | }
83 | String voice;
84 | languages = await flutterTts.getLanguages;
85 | // await flutterTts.getVoices.then((val){
86 | // voice = val[0];
87 | // print(voice);
88 | // });
89 |
90 | await flutterTts.setLanguage("en-US");
91 | // await flutterTts.setVoice("es-us-x-sfb#male_1-loca");
92 | await flutterTts.setVoice("en-us-x-sfg#male_2-local");
93 | await flutterTts.setSpeechRate(1.0);
94 |
95 | await flutterTts.setVolume(1);
96 |
97 | await flutterTts.setPitch(.8);
98 | await flutterTts.isLanguageAvailable("en-US");
99 | var list2 = description.toString().split('.');
100 | var des = list2.length > 3 ? (list2[0] +'\n\n' + list2[1]) +'\n\n' + list2[2] : list2.length > 2 ? (list2[0] +'\n\n' + list2[1]) : list2[0];
101 | _speak(model.name.split(' ')[0],state.pokemonSpecies.genera.firstWhere((x)=>x.language.name == 'en').genus, des);
102 | }
103 | Future _stop() async{
104 | await flutterTts.stop();
105 | }
106 |
107 | Widget _pokemonInfo(){
108 | return Column(
109 | children: [
110 | Row(
111 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
112 | crossAxisAlignment: CrossAxisAlignment.start,
113 | children: [
114 | Expanded(
115 | flex: 3,
116 | child: Text(
117 | model.name,
118 | style: TextStyle(
119 | fontSize: getFontSize(context,30),
120 | color: Colors.white,
121 | fontWeight: FontWeight.w600),
122 | // overflow: TextOverflow.ellipsis,
123 | ),
124 | ),
125 | Padding(
126 | padding: EdgeInsets.only(top: 10),
127 | child: customText('#' + (model.orderId.toString().length == 1 ? '00' + model.orderId.toString() : model.orderId.toString().length == 2 ? '0'+model.orderId.toString() : model.orderId.toString()),style: TextStyle(fontSize: getFontSize(context,20),color: Colors.white,fontWeight: FontWeight.w600),),
128 | )
129 | ],
130 | ),
131 | SizedBox(height: 10,),
132 | Row(
133 | children: [
134 | _pokemonCategoryChip(model.type1),
135 | SizedBox(width: 10,),
136 | _pokemonCategoryChip(model.type2),
137 | ],
138 | )
139 | ],
140 | );
141 | }
142 |
143 | Widget _pokemonCategoryChip(String type) {
144 | if(type == null || type.isEmpty){
145 | return Container();
146 | }
147 | return Container(
148 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
149 | height: 30,
150 | decoration: BoxDecoration(
151 | color: setSecondaryColor(type),
152 | borderRadius: BorderRadius.circular(20)),
153 | child: Row(children: [
154 | Text(type,style: TextStyle(color: Colors.white, fontSize: getFontSize(context,16)),),
155 | Image.asset(getTypeImage(type))
156 | ],)
157 | );
158 | }
159 |
160 | Widget _evalutionSection() {
161 | final state = Provider.of(context);
162 | return SingleChildScrollView(
163 | child: Container(
164 | padding: EdgeInsets.symmetric(horizontal: 30, vertical: 20),
165 | child: Column(
166 | crossAxisAlignment: CrossAxisAlignment.start,
167 | children: [
168 | Text(
169 | "Evaluation Chain",
170 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: getFontSize(context,(14))),
171 | ),
172 | SizedBox(
173 | height: 10,
174 | ),
175 | _evaluationChainRow('Lvl 15',state?.pokemonDetail?.name),
176 | Divider(),
177 | SizedBox(
178 | height: 5,
179 | ),
180 | _evaluationChainRow('Lvl 16',state?.pokemonDetail?.name),
181 | Divider(),
182 | SizedBox(
183 | height: 5,
184 | ),
185 | _evaluationChainRow('Lvl 17',state?.pokemonDetail?.name),
186 | Divider(),
187 | SizedBox(
188 | height: 5,
189 | ),
190 | _evaluationChainRow('Lvl 18',state?.pokemonDetail?.name),
191 | SizedBox(
192 | height: 20,
193 | ),
194 | ],
195 | ),
196 | ),
197 | );
198 | }
199 |
200 | Widget _evaluationChainRow(String lvl,String name) {
201 | return Row(
202 | children: [
203 | Expanded(
204 | flex: 1,
205 | child: _pokemonEvaluationImage(model.image, name),
206 | ),
207 | Expanded(
208 | flex: 2,
209 | child: Column(
210 | children: [
211 | Icon(
212 | Icons.arrow_forward,
213 | color: Colors.black26,
214 | ),
215 | Text(
216 | lvl,
217 | style: TextStyle(fontSize: getFontSize(context,12)),
218 | )
219 | ],
220 | ),
221 | ),
222 | Expanded(
223 | flex: 1,
224 | child: _pokemonEvaluationImage(model.image, name),
225 | ),
226 | ],
227 | );
228 | }
229 |
230 | Widget _pokemonEvaluationImage(String img, String name) {
231 | return Column(
232 | children: [
233 | Stack(
234 | alignment: Alignment.center,
235 | children: [
236 | Image.asset(
237 | 'assets/images/pokeball.png',
238 | height: 70,
239 | color: Color(0xffe3e3e3),
240 | ),
241 | Image.network(
242 | img,
243 | height: 60,
244 | )
245 | ],
246 | ),
247 | SizedBox(
248 | height: 10,
249 | ),
250 | customText(
251 | name,
252 | style: TextStyle(fontSize: getFontSize(context,14)),
253 | )
254 | ],
255 | );
256 | }
257 |
258 | Widget _topRightPokeball() {
259 | return Positioned(
260 | right: 0,
261 | top: 0,
262 | child: Align(
263 | heightFactor: fullWidth(context) <= 360 ? getDimention(context, 1.03) : .75,
264 | widthFactor: fullWidth(context) <= 360 ? getDimention(context,.98) : .7,
265 | alignment: Alignment.bottomLeft,
266 | child: RotationTransition(
267 | turns: Tween(begin: 0.0, end: 1.0).animate(_controller),
268 | child: Opacity(
269 | opacity: opacity,
270 | child: Image.asset(
271 | 'assets/images/pokeball.png',
272 | color: setSecondaryColor(model.type1),
273 | height: getDimention(context, 250),
274 | ),
275 | ))));
276 | }
277 |
278 | Widget _pokemonType(){
279 | final state = Provider.of(context);
280 | if(state.pokemonSpecies != null && state.pokemonSpecies.genera != null && state.pokemonSpecies.genera.length > 0){
281 | var type = state.pokemonSpecies.genera.firstWhere((x)=>x.language.name == 'en').genus;
282 | return customText(type,
283 | style: TextStyle(color: Colors.white60, fontSize: getFontSize(context,18)),
284 | );
285 | }
286 | else{
287 | return Container();
288 | }
289 | }
290 | @override
291 | Widget build(BuildContext context) {
292 | return Scaffold(
293 | backgroundColor: setprimaryColor(model.type1),
294 | body: Stack(
295 | children: [
296 | _topRightPokeball(),
297 | Positioned(
298 | top: -getDimention(context,20),
299 | left: -getDimention(context,45),
300 | child: Transform.rotate(
301 | angle: 7.6,
302 | child: Container(
303 | height: getDimention(context,140),
304 | width: getDimention(context,140),
305 | decoration: BoxDecoration(
306 | borderRadius: BorderRadius.circular(20),
307 | color: setSecondaryColor(model.type1),
308 | ),
309 | ),
310 | )),
311 | Positioned(
312 | left:fullWidth(context) / 2 + 10,
313 | top: 5,
314 | child: Image.asset(
315 | 'assets/images/dotted.png',
316 | color: setSecondaryColor(model.type1),
317 | height: getDimention(context,50),
318 | ),
319 | ),
320 | Positioned(
321 | left: 10,
322 | top: getDimention(context,40),
323 | right: 25,
324 | child: Row(
325 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
326 | children: [
327 | BackButton(
328 | color: Colors.white60,
329 | ),
330 | IconButton(
331 | onPressed: () {
332 | setState(() {
333 | isFavourite = !isFavourite;
334 | });
335 | },
336 | iconSize: 40,
337 | alignment: Alignment.center,
338 | padding: EdgeInsets.all(0),
339 | icon: Icon(
340 | isFavourite ? Icons.favorite : Icons.favorite_border,
341 | size: 30,
342 | color: Colors.white60,
343 | ),
344 | )
345 | ],
346 | ),
347 | ),
348 | Positioned(
349 | top: 120,
350 | left: 20,
351 | width: MediaQuery.of(context).size.width - 40,
352 | child:_pokemonInfo()),
353 | Positioned(
354 | top: 160,
355 | right: 20,
356 | // width: MediaQuery.of(context).size.width - 40,
357 | child: _pokemonType()),
358 | Positioned(
359 | right: 50,
360 | left: 50,
361 | top: getDimention(context,300),
362 | child: Align(
363 | heightFactor: getDimention(context,0.75),
364 | widthFactor: .7,
365 | alignment: Alignment.center,
366 | child: RotationTransition(
367 | turns: Tween(begin: 0.0, end: 1.0).animate(_controller),
368 | child: Image.asset(
369 | 'assets/images/pokeball.png',
370 | color: setSecondaryColor(model.type1),
371 | height: getDimention(context,250),
372 | ),
373 | ))),
374 | SlidingUpPanel(
375 | borderRadius: BorderRadius.only(
376 | topLeft: Radius.circular(20), topRight: Radius.circular(20)),
377 | onPanelSlide: (slide) {
378 | // print(slide.toString());
379 | setState(() {
380 | opacity = slide;
381 | });
382 | },
383 | onPanelOpened: () {},
384 | onPanelClosed: () {},
385 | minHeight: MediaQuery.of(context).size.height - getDimention(context,430),
386 | maxHeight: MediaQuery.of(context).size.height - getDimention(context,200),
387 | panel: Container(
388 | width: MediaQuery.of(context).size.width,
389 | padding: EdgeInsets.only(top: getFontSize(context,(20))),
390 | decoration: BoxDecoration(
391 | color: Colors.white,
392 | borderRadius: BorderRadius.only(
393 | topLeft: Radius.circular(20),
394 | topRight: Radius.circular(20)),
395 | ),
396 | child: DefaultTabController(
397 | length: 4,
398 | child: Scaffold(
399 | backgroundColor: Colors.white,
400 | appBar: TabBar(
401 | indicatorColor: setprimaryColor(model.type1),
402 | labelColor: Colors.black,
403 | unselectedLabelColor: Colors.black54,
404 | indicatorPadding: EdgeInsets.symmetric(horizontal: getFontSize(context,20,)),
405 | tabs: [
406 | Tab( child: Text('About',style: TextStyle(color: Colors.black, fontWeight: FontWeight.w900,fontSize: getFontSize(context,13)),),),
407 | Tab(child: Text('Base State',style: TextStyle(color: Colors.black, fontWeight: FontWeight.w900,fontSize: getFontSize(context,13)),),),
408 | Tab(child: Text('Evaluation',style: TextStyle(color: Colors.black, fontWeight: FontWeight.w900,fontSize: getFontSize(context,13)),),),
409 | Tab(child: Text('Moves',style: TextStyle(color: Colors.black, fontWeight: FontWeight.w900,fontSize: getFontSize(context,13),)),),
410 | ],
411 | ),
412 | body: TabBarView(
413 | children: [
414 | About(model: model,),
415 | BaseState(),
416 | _evalutionSection(),
417 | Moves(type:model.type1),
418 | ],
419 | ),
420 | ),
421 | ),
422 | ),
423 | ),
424 | Positioned(
425 | width: MediaQuery.of(context).size.width,
426 | top: getDimention(context,260),
427 | height: getDimention(context,200 * (1 - opacity)),
428 | child: Opacity(
429 | opacity: 1 - opacity,
430 | child: CarouselSlider(
431 | autoPlayCurve: Curves.easeInOutCirc,
432 | enableInfiniteScroll: false,
433 | onPageChanged: (page) {
434 | print(page.toString());
435 | setState(() {
436 | sliderPageno = page;
437 | });
438 | },
439 | viewportFraction: .6,
440 | initialPage: 0,
441 | enlargeCenterPage: true,
442 | autoPlay: false,
443 | items: [
444 | AnimatedContainer(
445 | constraints: BoxConstraints( maxHeight: 100),
446 | duration: Duration(milliseconds: 500),
447 | child: 0 == (sliderPageno)
448 | ? Hero(
449 | tag: model.orderId,
450 | child: Image( image: customAdvanceNetworkImage(model.image,),fit: BoxFit.contain,),
451 | )
452 | : Image(image: customAdvanceNetworkImage(model.image),color: setSecondaryColor(model.type1),),
453 | ),
454 | AnimatedContainer(
455 | constraints: BoxConstraints( maxHeight: 1 == (sliderPageno) ? 200 : 180),
456 | duration: Duration(milliseconds: 500),
457 | child: 1 == (sliderPageno)
458 | ?Image( image: customAdvanceNetworkImage(model.image,),fit: BoxFit.contain,)
459 | : Image(image: customAdvanceNetworkImage(model.image),color: setSecondaryColor(model.type1),),
460 | ),
461 | AnimatedContainer(
462 | constraints: BoxConstraints( maxHeight: 2 == (sliderPageno) ? 200 : 150),
463 | duration: Duration(milliseconds: 500),
464 | child: 2 == (sliderPageno)
465 | ? Image( image: customAdvanceNetworkImage(model.image,),fit: BoxFit.contain,)
466 | : Image(image: customAdvanceNetworkImage(model.image),color: setSecondaryColor(model.type1),),
467 | ),
468 | ],
469 | ),
470 | )),
471 | ],
472 | ),
473 | );
474 | }
475 | }
476 |
--------------------------------------------------------------------------------
/lib/pages/pokemonDetails/about.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutte_pokedex/helper/colorTheme.dart';
2 | import 'package:flutte_pokedex/model/pokemonList.dart';
3 | import 'package:flutte_pokedex/scoped_model/pokemonState.dart';
4 | import 'package:flutte_pokedex/widgets/customWidget.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_tts/flutter_tts.dart';
7 | import 'package:provider/provider.dart';
8 |
9 | class About extends StatefulWidget {
10 | final PokemonListModel model;
11 |
12 | const About({this.model});
13 | _AboutState createState() => _AboutState();
14 | }
15 |
16 | class _AboutState extends State with TickerProviderStateMixin{
17 | PokemonListModel model;
18 | bool isExpanded = false;
19 | @override
20 | void initState() {
21 | model = widget.model;
22 | super.initState();
23 | }
24 | double _getFontSize(double size){
25 | if(MediaQuery.of(context).textScaleFactor < 1){
26 | return size;
27 | }
28 | else{
29 | return (size / MediaQuery.of(context).textScaleFactor);
30 | }
31 |
32 | }
33 | Widget aboutSection() {
34 | final state = Provider.of(context);
35 | return SingleChildScrollView(
36 | child: Container(
37 | padding: EdgeInsets.only(left: 20, right: 20,bottom: 20,top: 5),
38 | child: Column(
39 | crossAxisAlignment: CrossAxisAlignment.start,
40 | children: [
41 |
42 | _description(),
43 | Container(
44 | height: _getFontSize(70),
45 | margin: EdgeInsets.only(bottom: _getFontSize(10)),
46 | decoration: BoxDecoration(
47 | color: Colors.white,
48 | borderRadius: BorderRadius.circular(10),
49 | boxShadow: [
50 | BoxShadow(
51 | blurRadius: 20,
52 | color: Colors.grey.withOpacity(.2),
53 | offset: Offset(0, 5),
54 | )
55 | ]),
56 | padding: EdgeInsets.symmetric(horizontal: 30, vertical: _getFontSize(10)),
57 | child: Row(
58 | mainAxisAlignment: MainAxisAlignment.start,
59 | children: [
60 | Column(
61 | crossAxisAlignment: CrossAxisAlignment.start,
62 | mainAxisAlignment: MainAxisAlignment.center,
63 | children: [
64 | Text(
65 | 'Weight',
66 | style: TextStyle(
67 | color: Colors.black87, fontFamily: 'Circular-bold',fontSize: _getFontSize(14)),
68 | ),
69 | SizedBox(
70 | height: 5,
71 | ),
72 | customText('${state?.pokemonDetail?.weight} kg',style: TextStyle(fontSize: _getFontSize(14)),)
73 | ],
74 | ),
75 | SizedBox(
76 | width: 50,
77 | ),
78 | Column(
79 | crossAxisAlignment: CrossAxisAlignment.start,
80 | mainAxisAlignment: MainAxisAlignment.center,
81 | children: [
82 | Text(
83 | 'Height',
84 | style: TextStyle(
85 | color: Colors.black87, fontFamily: 'Circular-bold',fontSize: _getFontSize(14)),
86 | ),
87 | SizedBox(
88 | height: 5,
89 | ),
90 | Text('${state?.pokemonDetail?.height} cm',style: TextStyle(fontSize: _getFontSize(14)),)
91 | ],
92 | ),
93 | ],
94 | ),
95 | ),
96 | Text('Breeding',style: TextStyle(fontWeight: FontWeight.w600,fontSize: _getFontSize(14)),),
97 | SizedBox(height: 10,),
98 | _gender(),
99 | SizedBox(height: 10,),
100 | _eggGroup(),
101 | _propertyRow('Egge Cycle',model.type1),
102 | SizedBox(height: 10,),
103 |
104 | Text('Location',style: TextStyle(fontWeight: FontWeight.w600,fontSize: _getFontSize(14)),),
105 | SizedBox(height: 10,),
106 | Container(
107 | height: _getFontSize(150),
108 | decoration: BoxDecoration(
109 | borderRadius: BorderRadius.circular(20),
110 | color: setprimaryColor(model.type1),
111 | image: DecorationImage(
112 | image: customAdvanceNetworkImage(
113 | 'https://tr4.cbsistatic.com/hub/i/r/2014/07/09/5ddb5529-bdc9-4656-913d-8cc299ea5e15/resize/1200x/b4fddca0887e8fdbdef49b4515c2844a/staticmapgoogle0514.png',
114 | ),
115 | fit: BoxFit.cover)),
116 | ),
117 | SizedBox(height: 14,),
118 | Text('Training',style: TextStyle(fontWeight: FontWeight.w600,fontSize: _getFontSize(15)),),
119 | SizedBox(height: 10,),
120 | Row(
121 | children: [
122 | Text('Base EXP',style: TextStyle(fontSize: _getFontSize(14), color: Colors.black45),),
123 | SizedBox(width: 50,),
124 | customText(state.pokemonDetail?.baseExperience?.toString(),
125 | style: TextStyle(fontSize: _getFontSize(14), color: Colors.black87),
126 | ),
127 | ],
128 | ),
129 | ],
130 | ),
131 | ),
132 | );
133 | }
134 |
135 | Widget _description(){
136 | final state = Provider.of(context);
137 | if(state.pokemonSpecies == null || state.pokemonSpecies.flavorTextEntries == null || state.pokemonSpecies.flavorTextEntries.length == 0){
138 | return Container();
139 | }
140 | var list = state.pokemonSpecies.flavorTextEntries.where((x)=> x.language.name == 'en').toSet().toList();
141 | list = list.toSet().toList();
142 | list.forEach((x)=> x.flavorText..replaceAll("\n", " "));
143 | String desc = '';
144 | StringBuffer description = new StringBuffer();
145 |
146 | for(int i= 0; i< list.length ;i++){
147 | var it = list[i].flavorText.replaceAll("\n", " ");
148 | if(!desc.toString().toLowerCase().contains(it.toLowerCase())){
149 | description.write(it + ' ');
150 | desc += it+ ' ';
151 | }
152 | }
153 |
154 | var wid = Column(
155 | crossAxisAlignment: CrossAxisAlignment.end,
156 | children: [
157 | AnimatedSize(
158 | vsync: this,
159 | duration: const Duration(milliseconds: 500),
160 | child: new ConstrainedBox(
161 | constraints: isExpanded
162 | ? new BoxConstraints()
163 | : new BoxConstraints(maxHeight: 58.0),
164 | child: new Text(
165 | description.toString().replaceAll("\n", " "),
166 | softWrap: true,
167 | overflow: TextOverflow.fade,
168 | style: TextStyle(fontSize: _getFontSize(14),),textAlign: TextAlign.justify,
169 | ))),
170 | new FlatButton(
171 | padding: EdgeInsets.all(0),
172 | child: Text(!isExpanded ? 'more...' : 'Less...',style: TextStyle(color: Colors.blue),),
173 | onPressed: () => setState(() => isExpanded = !isExpanded))
174 | ]);
175 |
176 | return wid;
177 | }
178 | Widget _gender(){
179 | return Row(
180 | children: [
181 | Expanded(
182 | child: Text('Gender',style: TextStyle(fontSize: _getFontSize(14), color: Colors.black45),),
183 | ),
184 | Expanded(
185 | flex: 2,
186 | child: Wrap(
187 | children: [
188 | Text('Male 87%',style: TextStyle(fontSize: _getFontSize(14), color: Colors.black87),),
189 | SizedBox(width: 10,),
190 | Text('Female 13%',style: TextStyle(fontSize: _getFontSize(14), color: Colors.black87),),
191 | ],
192 | ),
193 | )
194 | ],
195 | );
196 | }
197 | Widget _eggGroup(){
198 | final state = Provider.of(context);
199 | if(state.pokemonSpecies == null || state.pokemonSpecies.eggGroups == null || state.pokemonSpecies.eggGroups.length == 0){
200 | return Container();
201 | }
202 | var list = state.pokemonSpecies.eggGroups;
203 | return Container(
204 | width: fullWidth(context),
205 | child: Row(
206 | children: [
207 | Expanded(
208 | flex: 1,
209 | child: Text('Egg Groups',style: TextStyle(fontSize: _getFontSize(14), color: Colors.black45)),),
210 | Expanded(
211 | flex: 2,
212 | child: Wrap(
213 | children:list.map((x){
214 | return Container(
215 | child:Padding(
216 | padding: EdgeInsets.only(right: 10),
217 | child: customText(x.name,style: TextStyle(fontSize: _getFontSize(14), color: Colors.black87))
218 | )
219 | );
220 | }).toList(),
221 | ),
222 | )
223 | ],)
224 | );
225 | }
226 | Widget _propertyRow(String title,String value){
227 | return Padding(
228 | padding: EdgeInsets.only(top: 10),
229 | child: Row(
230 | children: [
231 | Expanded(
232 | flex: 1,
233 | child: Text(title,style: TextStyle(fontSize: _getFontSize(14), color: Colors.black45)),
234 | ),
235 | Expanded(flex: 2,
236 | child: Text(value,style: TextStyle(fontSize: _getFontSize(14), color: Colors.black87),)
237 | )
238 | ],),);
239 | }
240 |
241 |
242 | @override
243 | Widget build(BuildContext context) {
244 | return aboutSection();
245 | }
246 | }
247 |
--------------------------------------------------------------------------------
/lib/pages/pokemonDetails/baseState.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutte_pokedex/helper/colorTheme.dart';
2 | import 'package:flutte_pokedex/model/pokemonDetail.dart';
3 | import 'package:flutte_pokedex/model/pokemonList.dart';
4 | import 'package:flutte_pokedex/scoped_model/pokemonState.dart';
5 | import 'package:flutte_pokedex/widgets/customWidget.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:provider/provider.dart';
8 |
9 | import '../../widgets/customWidget.dart';
10 |
11 | class BaseState extends StatefulWidget {
12 | _BaseStateState createState() => _BaseStateState();
13 | }
14 |
15 | class _BaseStateState extends State
16 | with TickerProviderStateMixin {
17 | PokemonListModel model;
18 | double opacity = 0;
19 | int sliderPageno = 0;
20 | bool isFavourite = false;
21 | @override
22 | AnimationController _progressController;
23 | Animation _progressAnimation;
24 |
25 | @override
26 | void dispose() {
27 | _progressController.dispose();
28 | super.dispose();
29 | }
30 |
31 | @override
32 | void initState() {
33 |
34 |
35 |
36 | _progressController = AnimationController(
37 | duration: Duration(milliseconds: 4000), vsync: this);
38 | _progressAnimation =
39 | Tween(begin: 0.0, end: 1.0).animate(_progressController);
40 | _progressController.repeat();
41 | super.initState();
42 | }
43 | double _getFontSize(double size){
44 | if(MediaQuery.of(context).textScaleFactor < 1){
45 | return size;
46 | }
47 | else{
48 | return (size / MediaQuery.of(context).textScaleFactor);
49 | }
50 | }
51 | Widget _baseStateSection() {
52 | final state = Provider.of(context);
53 | if(state.pokemonDetail == null || state.pokemonDetail.stats == null){
54 | return Container();
55 | }
56 | var stats = state.pokemonDetail.stats;
57 | var listStates = stats.map((x) => _statesRow(x)).toList();
58 | var space = SizedBox(height: 20,);
59 | listStates.add(space);
60 | listStates.add( _abilities(state.pokemonDetail.abilities));
61 | listStates.add(_habitat());
62 | listStates.add(_shape());
63 | listStates.add(_seenAt());
64 | listStates.add(_pokemonColor());
65 | listStates.add(_captureRate());
66 |
67 | return Container(
68 | padding: EdgeInsets.symmetric(horizontal: 30, vertical: 20),
69 | child: Column(
70 | crossAxisAlignment: CrossAxisAlignment.start,
71 | children:listStates,
72 | )
73 | );
74 | }
75 | Widget _statesRow(Stat stat){
76 | return Padding(
77 | padding: EdgeInsets.symmetric(vertical: 10),
78 | child: _baseStateProperty(stat.stat.name,double.parse(stat.baseStat.toString()),_getStateColor(stat.stat.name)) ,
79 | );
80 | }
81 | Widget _baseStateProperty(String property, double value, Color color) {
82 | return Column(
83 | children:[
84 | Row(
85 | children: [
86 | Expanded(
87 | flex: 3,
88 | child: Text(
89 | property,
90 | style: TextStyle(fontSize: _getFontSize(15), color: Colors.black54),
91 | ),
92 | ),
93 | Text(
94 | value.toString(),
95 | style: TextStyle(fontSize: _getFontSize(15), color: Colors.black),
96 | ),
97 |
98 | ],
99 | ),
100 | LinearProgressIndicator(
101 | value: value / 100,
102 | backgroundColor: Colors.grey.shade200,
103 | valueColor: AlwaysStoppedAnimation(color),
104 | ),
105 |
106 | ]
107 | );
108 | }
109 | Widget _abilities(List abilityList){
110 | return Container(
111 | width: fullWidth(context),
112 | child: Row(
113 | children: