├── .github
└── workflows
│ └── static.yml
├── .gitignore
├── .metadata
├── LICENSE
├── Makefile
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle.kts
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── io
│ │ │ │ └── adaptiv
│ │ │ │ └── flutter_kit
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── 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-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle.kts
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle.kts
├── assets
├── fonts
│ ├── GeneralSans-Bold.otf
│ ├── GeneralSans-BoldItalic.otf
│ ├── GeneralSans-Extralight.otf
│ ├── GeneralSans-ExtralightItalic.otf
│ ├── GeneralSans-Italic.otf
│ ├── GeneralSans-Light.otf
│ ├── GeneralSans-LightItalic.otf
│ ├── GeneralSans-Medium.otf
│ ├── GeneralSans-MediumItalic.otf
│ ├── GeneralSans-Regular.otf
│ ├── GeneralSans-Semibold.otf
│ └── GeneralSans-SemiboldItalic.otf
└── images
│ ├── apple-logo.svg
│ └── google-logo.svg
├── build.yaml
├── flutter-kit-logo.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── Runner
│ ├── AppDelegate.swift
│ ├── 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
│ └── Runner-Bridging-Header.h
└── RunnerTests
│ └── RunnerTests.swift
├── lib
├── gen
│ └── assets.gen.dart
├── main.dart
└── src
│ ├── core
│ ├── app_initializer.dart
│ ├── application.dart
│ ├── environment.dart
│ ├── i18n
│ │ ├── intl
│ │ │ ├── messages_all.dart
│ │ │ └── messages_en.dart
│ │ ├── l10n.dart
│ │ └── l10n
│ │ │ └── intl_en.arb
│ ├── routing
│ │ ├── app_router.dart
│ │ └── app_router.gr.dart
│ └── theme
│ │ ├── app_theme.dart
│ │ ├── color_scheme_extension.dart
│ │ ├── color_schemes.dart
│ │ ├── custom_colors.dart
│ │ └── dimens.dart
│ ├── datasource
│ ├── http
│ │ ├── dio_config.dart
│ │ ├── example_api.dart
│ │ └── http_util.dart
│ ├── models
│ │ └── api_response
│ │ │ └── api_response.dart
│ └── repositories
│ │ ├── base_repository.dart
│ │ └── example_repository.dart
│ ├── features
│ └── login
│ │ ├── logic
│ │ ├── login_controller.dart
│ │ └── login_state.dart
│ │ └── ui
│ │ └── login_screen.dart
│ └── shared
│ ├── components
│ ├── app_snackbar.dart
│ ├── atoms
│ │ ├── basic_card.dart
│ │ └── dividers
│ │ │ └── labeled_divider.dart
│ ├── business
│ │ └── listenable_consumer.dart
│ ├── buttons
│ │ └── button.dart
│ ├── dialogs
│ │ ├── confirmation_dialog.dart
│ │ ├── informative_dialog.dart
│ │ └── loading_dialog.dart
│ └── forms
│ │ └── input.dart
│ ├── extensions
│ ├── context_extensions.dart
│ └── iterable_extensions.dart
│ ├── locator.dart
│ └── services
│ ├── app_logger.dart
│ └── storage
│ ├── in_memory_storage.dart
│ ├── local_storage.dart
│ └── storage.dart
├── pubspec.lock
├── pubspec.yaml
├── setup.bat
├── setup.sh
└── test
└── widget_test.dart
/.github/workflows/static.yml:
--------------------------------------------------------------------------------
1 | # Simple workflow for deploying static content to GitHub Pages
2 | name: Deploy static content to Pages
3 |
4 | on:
5 | # Runs on pushes targeting the default branch
6 | push:
7 | branches: ["site"]
8 |
9 | # Allows you to run this workflow manually from the Actions tab
10 | workflow_dispatch:
11 |
12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13 | permissions:
14 | contents: read
15 | pages: write
16 | id-token: write
17 |
18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20 | concurrency:
21 | group: "pages"
22 | cancel-in-progress: false
23 |
24 | jobs:
25 | # Single deploy job since we're just deploying
26 | deploy:
27 | environment:
28 | name: github-pages
29 | url: ${{ steps.deployment.outputs.page_url }}
30 | runs-on: ubuntu-latest
31 | steps:
32 | - name: Checkout
33 | uses: actions/checkout@v4
34 | - name: Setup Pages
35 | uses: actions/configure-pages@v5
36 | - name: Upload artifact
37 | uses: actions/upload-pages-artifact@v3
38 | with:
39 | # Upload entire repository
40 | path: './docs'
41 | - name: Deploy to GitHub Pages
42 | id: deployment
43 | uses: actions/deploy-pages@v4
44 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .build/
9 | .buildlog/
10 | .history
11 | .svn/
12 | .swiftpm/
13 | migrate_working_dir/
14 |
15 | # IntelliJ related
16 | *.iml
17 | *.ipr
18 | *.iws
19 | .idea/
20 |
21 | # The .vscode folder contains launch configuration and tasks you configure in
22 | # VS Code which you may wish to be included in version control, so this line
23 | # is commented out by default.
24 | #.vscode/
25 |
26 | # Flutter/Dart/Pub related
27 | **/doc/api/
28 | **/ios/Flutter/.last_build_id
29 | .dart_tool/
30 | .flutter-plugins
31 | .flutter-plugins-dependencies
32 | .packages
33 | .pub-cache/
34 | .pub/
35 | /build/
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
48 | .fvm/
49 | .vscode/
50 |
51 | .fvmrc
--------------------------------------------------------------------------------
/.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: "09de023485e95e6d1225c2baa44b8feb85e0d45f"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
17 | base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
18 | - platform: ios
19 | create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
20 | base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
21 |
22 | # User provided section
23 |
24 | # List of Local paths (relative to this file) that should be
25 | # ignored by the migrate tool.
26 | #
27 | # Files that are not part of the templates will be ignored by default.
28 | unmanaged_files:
29 | - 'lib/main.dart'
30 | - 'ios/Runner.xcodeproj/project.pbxproj'
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | **Copyright (c) 2024 Steve Nosse**
2 |
3 | **Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:**
4 |
5 | **The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.**
6 |
7 | **THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | clean-ios:
2 | @echo "Cleaning iOS build files..."
3 | flutter clean
4 | rm -rf ios/Pods ios/Podfile.lock
5 | flutter pub get
6 | cd ios && pod install && cd ..
7 |
8 | codegen:
9 | @echo "Generating code..."
10 | fvm dart run build_runner build --delete-conflicting-outputs
11 |
12 | i18n:
13 | @echo "Generating i18n..."
14 | fvm dart run intl_utils:generate
15 |
16 | build-android:
17 | @echo "Building Android..."
18 | fvm flutter build appbundle --release
19 |
20 | build-ios:
21 | @echo "Building iOS..."
22 | fvm flutter build ios
23 |
24 | get:
25 | @echo "Getting dependencies..."
26 | fvm flutter pub get
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
Flutter Kit
2 |
3 | Opinionated flutter starter project using feature-first folder structure.
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |

14 |
15 |
16 | ## Motivation
17 |
18 | Flutter is geat, really. But after few years of development, it's not as easy as it seems; starting a new project can be quite a challenge. The fact that Flutter is as less opinionated has some benefits but also comes with some drawbacks among those the pain of starting a new project. You can easily waste a lot how hours to get productive, while you only wanted to POC a new idea.
19 |
20 | This kit provides a set of preconfigured features and utilities to help you get started with your project. It is inspired by my own experience and knowledge of Flutter. I hope you find it useful.
21 |
22 | If you are not confortable with some choices i made in the structure, we can either discuss it (yeah i may find it helpful) or fork this repo to create your own.
23 |
24 | ## What's in this kit?
25 | This kit includes:
26 |
27 | - An example login feature
28 | - I18n
29 | - Navigation
30 | - State management
31 | - Extensions
32 | - Basic config for API calls
33 | - Theming (Material 3)
34 |
35 | ## Get started
36 |
37 | ### 1. Clone the repository
38 | ```bash
39 | git clone git@github.com:stevenosse/flutter_kit.git
40 | ```
41 |
42 | ### 2. Configure your project
43 |
44 | Add your configuration to the `pubspec.yaml` file under the `flutter_kit` key:
45 |
46 | ```yaml
47 | flutter_kit:
48 | app_name: Your App Name
49 | ios_bundle_id: com.yourcompany.yourapp
50 | android_package_name: com.yourcompany.yourapp
51 | ```
52 |
53 | ### 3. Run the setup script
54 |
55 | #### On macOS/Linux:
56 | ```bash
57 | chmod +x setup.sh
58 | ./setup.sh
59 | ```
60 |
61 | #### On Windows:
62 | ```bash
63 | setup.bat
64 | ```
65 |
66 | The setup script will:
67 | - Update your app name for both iOS and Android
68 | - Change the iOS bundle identifier
69 | - Change the Android package name
70 | - Move the Android files to the correct package structure
71 |
72 | ### 4. Run flutter pub get
73 | ```bash
74 | flutter pub get
75 | ```
76 |
77 | ## Features
78 | This kit comes with a set of preconfigured features and utilities:
79 |
80 | - I18n
81 | - Navigation (using auto_route)
82 | - State management (using plain change notifier)
83 | - Extensions (on context, iterable)
84 | - Utility widgets
85 | - Default Theming using Material 3
86 |
87 | ## 🗺️ I18n
88 | This kit uses [intl_utils](https://pub.dev/packages/intl_utils) for internationalization. To add a new language, add a new file to the `src/core/i18n/l10n` folder. The file name should be the language code prefixed with intl_ (e.g. `intl_fr.arb`).
89 |
90 | To generate the code for the new language, run the following command:
91 |
92 | ```bash
93 | flutter pub run intl_utils:generate
94 | ```
95 |
96 | Alternatively, you can install the [flutter_intl](https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl) package in VSCode to automatically generate the code when you save the file.
97 |
98 | ## 🛣️ Navigation
99 | This kit uses [auto_route](https://pub.dev/packages/auto_route) for navigation. To add a new route, add a new file to the `src/core/routing/app_router.dart` file.
100 |
101 | See the [auto_route documentation](https://pub.dev/packages/auto_route) for more information.
102 |
103 | ## 🧱 State Management
104 | This kit uses plain change notifiers for state management.
105 |
106 | An example of a change notifier can be found in the `src/features/login/logic` folder.
107 |
108 | ## 🗼 Extensions
109 | This kit comes with a few extensions on the `BuildContext` and `Iterable` classes. See the `src/shared/extensions` folder for more information.
110 |
111 | ## 📌 Utils
112 | ### Widgets
113 | This kit comes with a few utility widgets. See the `src/shared/components` folder for more information.
114 |
115 | ### Assets
116 | Assets paths are automatically generated when using build_runnner thanks to the [flutter_gen](https://pub.dev/packages/https://pub.dev/packages/flutter_gen) package.
117 |
118 | Each time you add an asset, run the following command:
119 |
120 | ```bash
121 | $ fluttergen
122 | ```
123 |
124 | ### CLI
125 | This kit comes with a few CLI commands to make your life easier.
126 | It uses make:
127 |
128 | - Windows: `choco install make`
129 | - Linux: `sudo apt install make`
130 | - Mac: `brew install make`
131 |
132 | See the `Makefile` for more information.
133 |
134 | ## 🖌️ Theming
135 | This kit uses the new Material 3 theming system. See the `src/core/theme` folder for more information.
136 |
137 | The default color scheme is generated using https://m3.material.io/theme-builder#/custom. You can use this tool to generate your own color scheme.
138 |
139 | ## Showcase
140 | - [LineAI](https://github.com/stevenosse/lineai)
141 |
142 | ## 💼 Need a new feature?
143 | If you need a new feature, please open an issue on the [GitHub repository](https://github.com/stevenosse/flutter_boilerplate/issues/new)
144 |
145 | ## 📇 Get in touch
146 | If you have any questions, feel free to contact me on [Twitter](https://twitter.com/nossesteve)
147 |
148 | ## TODO
149 | - [ ] Setup a CI pipeline
150 | - [ ] Add setup for unit tests
151 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | linter:
4 | rules:
5 | avoid_print: true
6 | prefer_single_quotes: true
7 | use_super_parameters: true
8 | always_declare_return_types: true
9 | avoid_annotating_with_dynamic: true
10 | strict_top_level_inference: false
11 |
12 | analyzer:
13 | exclude: ["**.freezed.dart", "**.g.dart"]
14 |
15 | errors:
16 | invalid_annotation_target: ignore
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 | .cxx/
9 |
10 | # Remember to never publicly share your keystore.
11 | # See https://flutter.dev/to/reference-keystore
12 | key.properties
13 | **/*.keystore
14 | **/*.jks
15 |
--------------------------------------------------------------------------------
/android/app/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.application")
3 | id("kotlin-android")
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id("dev.flutter.flutter-gradle-plugin")
6 | }
7 |
8 | android {
9 | namespace = "io.adaptiv.flutter_kit"
10 | compileSdk = flutter.compileSdkVersion
11 | ndkVersion = flutter.ndkVersion
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_11
15 | targetCompatibility = JavaVersion.VERSION_11
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_11.toString()
20 | }
21 |
22 | defaultConfig {
23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24 | applicationId = "io.adaptiv.flutter_kit"
25 | // You can update the following values to match your application needs.
26 | // For more information, see: https://flutter.dev/to/review-gradle-config.
27 | minSdk = flutter.minSdkVersion
28 | targetSdk = flutter.targetSdkVersion
29 | versionCode = flutter.versionCode
30 | versionName = flutter.versionName
31 | }
32 |
33 | buildTypes {
34 | release {
35 | // TODO: Add your own signing config for the release build.
36 | // Signing with the debug keys for now, so `flutter run --release` works.
37 | signingConfig = signingConfigs.getByName("debug")
38 | }
39 | }
40 | }
41 |
42 | flutter {
43 | source = "../.."
44 | }
45 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/io/adaptiv/flutter_kit/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package io.adaptiv.flutter_kit
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity : FlutterActivity()
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle.kts:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
9 | rootProject.layout.buildDirectory.value(newBuildDir)
10 |
11 | subprojects {
12 | val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
13 | project.layout.buildDirectory.value(newSubprojectBuildDir)
14 | }
15 | subprojects {
16 | project.evaluationDependsOn(":app")
17 | }
18 |
19 | tasks.register("clean") {
20 | delete(rootProject.layout.buildDirectory)
21 | }
22 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | val flutterSdkPath = run {
3 | val properties = java.util.Properties()
4 | file("local.properties").inputStream().use { properties.load(it) }
5 | val flutterSdkPath = properties.getProperty("flutter.sdk")
6 | require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
7 | flutterSdkPath
8 | }
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21 | id("com.android.application") version "8.7.0" apply false
22 | id("org.jetbrains.kotlin.android") version "1.8.22" apply false
23 | }
24 |
25 | include(":app")
26 |
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Bold.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-BoldItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-BoldItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Extralight.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Extralight.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-ExtralightItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-ExtralightItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Italic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Italic.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Light.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Light.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-LightItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-LightItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Medium.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Medium.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-MediumItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-MediumItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Regular.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-Semibold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-Semibold.otf
--------------------------------------------------------------------------------
/assets/fonts/GeneralSans-SemiboldItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/assets/fonts/GeneralSans-SemiboldItalic.otf
--------------------------------------------------------------------------------
/assets/images/apple-logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/images/google-logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | builders:
4 | json_serializable:
5 | options:
6 | explicit_to_json: true
--------------------------------------------------------------------------------
/flutter-kit-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/flutter-kit-logo.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 12.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/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, '12.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 flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 |
33 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
34 | target 'RunnerTests' do
35 | inherit! :search_paths
36 | end
37 | end
38 |
39 | post_install do |installer|
40 | installer.pods_project.targets.each do |target|
41 | flutter_additional_ios_build_settings(target)
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 97C146E61CF9000F007C117D /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 97C146ED1CF9000F007C117D;
25 | remoteInfo = Runner;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXCopyFilesBuildPhase section */
30 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
31 | isa = PBXCopyFilesBuildPhase;
32 | buildActionMask = 2147483647;
33 | dstPath = "";
34 | dstSubfolderSpec = 10;
35 | files = (
36 | );
37 | name = "Embed Frameworks";
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXCopyFilesBuildPhase section */
41 |
42 | /* Begin PBXFileReference section */
43 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
44 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
45 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
46 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
47 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
48 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
49 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
50 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 331C8082294A63A400263BE5 /* RunnerTests */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 331C807B294A618700263BE5 /* RunnerTests.swift */,
75 | );
76 | path = RunnerTests;
77 | sourceTree = "";
78 | };
79 | 9740EEB11CF90186004384FC /* Flutter */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
83 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
84 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
85 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
86 | );
87 | name = Flutter;
88 | sourceTree = "";
89 | };
90 | 97C146E51CF9000F007C117D = {
91 | isa = PBXGroup;
92 | children = (
93 | 9740EEB11CF90186004384FC /* Flutter */,
94 | 97C146F01CF9000F007C117D /* Runner */,
95 | 97C146EF1CF9000F007C117D /* Products */,
96 | 331C8082294A63A400263BE5 /* RunnerTests */,
97 | );
98 | sourceTree = "";
99 | };
100 | 97C146EF1CF9000F007C117D /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 97C146EE1CF9000F007C117D /* Runner.app */,
104 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
105 | );
106 | name = Products;
107 | sourceTree = "";
108 | };
109 | 97C146F01CF9000F007C117D /* Runner */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
113 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
114 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
115 | 97C147021CF9000F007C117D /* Info.plist */,
116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
118 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
119 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
120 | );
121 | path = Runner;
122 | sourceTree = "";
123 | };
124 | /* End PBXGroup section */
125 |
126 | /* Begin PBXNativeTarget section */
127 | 331C8080294A63A400263BE5 /* RunnerTests */ = {
128 | isa = PBXNativeTarget;
129 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
130 | buildPhases = (
131 | 331C807D294A63A400263BE5 /* Sources */,
132 | 331C807F294A63A400263BE5 /* Resources */,
133 | );
134 | buildRules = (
135 | );
136 | dependencies = (
137 | 331C8086294A63A400263BE5 /* PBXTargetDependency */,
138 | );
139 | name = RunnerTests;
140 | productName = RunnerTests;
141 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
142 | productType = "com.apple.product-type.bundle.unit-test";
143 | };
144 | 97C146ED1CF9000F007C117D /* Runner */ = {
145 | isa = PBXNativeTarget;
146 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
147 | buildPhases = (
148 | 9740EEB61CF901F6004384FC /* Run Script */,
149 | 97C146EA1CF9000F007C117D /* Sources */,
150 | 97C146EB1CF9000F007C117D /* Frameworks */,
151 | 97C146EC1CF9000F007C117D /* Resources */,
152 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
153 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
154 | );
155 | buildRules = (
156 | );
157 | dependencies = (
158 | );
159 | name = Runner;
160 | productName = Runner;
161 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
162 | productType = "com.apple.product-type.application";
163 | };
164 | /* End PBXNativeTarget section */
165 |
166 | /* Begin PBXProject section */
167 | 97C146E61CF9000F007C117D /* Project object */ = {
168 | isa = PBXProject;
169 | attributes = {
170 | BuildIndependentTargetsInParallel = YES;
171 | LastUpgradeCheck = 1510;
172 | ORGANIZATIONNAME = "";
173 | TargetAttributes = {
174 | 331C8080294A63A400263BE5 = {
175 | CreatedOnToolsVersion = 14.0;
176 | TestTargetID = 97C146ED1CF9000F007C117D;
177 | };
178 | 97C146ED1CF9000F007C117D = {
179 | CreatedOnToolsVersion = 7.3.1;
180 | LastSwiftMigration = 1100;
181 | };
182 | };
183 | };
184 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
185 | compatibilityVersion = "Xcode 9.3";
186 | developmentRegion = en;
187 | hasScannedForEncodings = 0;
188 | knownRegions = (
189 | en,
190 | Base,
191 | );
192 | mainGroup = 97C146E51CF9000F007C117D;
193 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
194 | projectDirPath = "";
195 | projectRoot = "";
196 | targets = (
197 | 97C146ED1CF9000F007C117D /* Runner */,
198 | 331C8080294A63A400263BE5 /* RunnerTests */,
199 | );
200 | };
201 | /* End PBXProject section */
202 |
203 | /* Begin PBXResourcesBuildPhase section */
204 | 331C807F294A63A400263BE5 /* Resources */ = {
205 | isa = PBXResourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | 97C146EC1CF9000F007C117D /* Resources */ = {
212 | isa = PBXResourcesBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
216 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
217 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXResourcesBuildPhase section */
223 |
224 | /* Begin PBXShellScriptBuildPhase section */
225 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
226 | isa = PBXShellScriptBuildPhase;
227 | alwaysOutOfDate = 1;
228 | buildActionMask = 2147483647;
229 | files = (
230 | );
231 | inputPaths = (
232 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
233 | );
234 | name = "Thin Binary";
235 | outputPaths = (
236 | );
237 | runOnlyForDeploymentPostprocessing = 0;
238 | shellPath = /bin/sh;
239 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
240 | };
241 | 9740EEB61CF901F6004384FC /* Run Script */ = {
242 | isa = PBXShellScriptBuildPhase;
243 | alwaysOutOfDate = 1;
244 | buildActionMask = 2147483647;
245 | files = (
246 | );
247 | inputPaths = (
248 | );
249 | name = "Run Script";
250 | outputPaths = (
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | shellPath = /bin/sh;
254 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
255 | };
256 | /* End PBXShellScriptBuildPhase section */
257 |
258 | /* Begin PBXSourcesBuildPhase section */
259 | 331C807D294A63A400263BE5 /* Sources */ = {
260 | isa = PBXSourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
264 | );
265 | runOnlyForDeploymentPostprocessing = 0;
266 | };
267 | 97C146EA1CF9000F007C117D /* Sources */ = {
268 | isa = PBXSourcesBuildPhase;
269 | buildActionMask = 2147483647;
270 | files = (
271 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
272 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | };
276 | /* End PBXSourcesBuildPhase section */
277 |
278 | /* Begin PBXTargetDependency section */
279 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
280 | isa = PBXTargetDependency;
281 | target = 97C146ED1CF9000F007C117D /* Runner */;
282 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
283 | };
284 | /* End PBXTargetDependency section */
285 |
286 | /* Begin PBXVariantGroup section */
287 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
288 | isa = PBXVariantGroup;
289 | children = (
290 | 97C146FB1CF9000F007C117D /* Base */,
291 | );
292 | name = Main.storyboard;
293 | sourceTree = "";
294 | };
295 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
296 | isa = PBXVariantGroup;
297 | children = (
298 | 97C147001CF9000F007C117D /* Base */,
299 | );
300 | name = LaunchScreen.storyboard;
301 | sourceTree = "";
302 | };
303 | /* End PBXVariantGroup section */
304 |
305 | /* Begin XCBuildConfiguration section */
306 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
307 | isa = XCBuildConfiguration;
308 | buildSettings = {
309 | ALWAYS_SEARCH_USER_PATHS = NO;
310 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
311 | CLANG_ANALYZER_NONNULL = YES;
312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
313 | CLANG_CXX_LIBRARY = "libc++";
314 | CLANG_ENABLE_MODULES = YES;
315 | CLANG_ENABLE_OBJC_ARC = YES;
316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_COMMA = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
328 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331 | CLANG_WARN_STRICT_PROTOTYPES = YES;
332 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
341 | GCC_C_LANGUAGE_STANDARD = gnu99;
342 | GCC_NO_COMMON_BLOCKS = YES;
343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
345 | GCC_WARN_UNDECLARED_SELECTOR = YES;
346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347 | GCC_WARN_UNUSED_FUNCTION = YES;
348 | GCC_WARN_UNUSED_VARIABLE = YES;
349 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
350 | MTL_ENABLE_DEBUG_INFO = NO;
351 | SDKROOT = iphoneos;
352 | SUPPORTED_PLATFORMS = iphoneos;
353 | TARGETED_DEVICE_FAMILY = "1,2";
354 | VALIDATE_PRODUCT = YES;
355 | };
356 | name = Profile;
357 | };
358 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
359 | isa = XCBuildConfiguration;
360 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
361 | buildSettings = {
362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363 | CLANG_ENABLE_MODULES = YES;
364 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
365 | DEVELOPMENT_TEAM = G2KAKX49M6;
366 | ENABLE_BITCODE = NO;
367 | INFOPLIST_FILE = Runner/Info.plist;
368 | LD_RUNPATH_SEARCH_PATHS = (
369 | "$(inherited)",
370 | "@executable_path/Frameworks",
371 | );
372 | PRODUCT_BUNDLE_IDENTIFIER = io.adaptiv.flutterKit;
373 | PRODUCT_NAME = "$(TARGET_NAME)";
374 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
375 | SWIFT_VERSION = 5.0;
376 | VERSIONING_SYSTEM = "apple-generic";
377 | };
378 | name = Profile;
379 | };
380 | 331C8088294A63A400263BE5 /* Debug */ = {
381 | isa = XCBuildConfiguration;
382 | buildSettings = {
383 | BUNDLE_LOADER = "$(TEST_HOST)";
384 | CODE_SIGN_STYLE = Automatic;
385 | CURRENT_PROJECT_VERSION = 1;
386 | GENERATE_INFOPLIST_FILE = YES;
387 | MARKETING_VERSION = 1.0;
388 | PRODUCT_BUNDLE_IDENTIFIER = io.adaptiv.flutterKit.RunnerTests;
389 | PRODUCT_NAME = "$(TARGET_NAME)";
390 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
391 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
392 | SWIFT_VERSION = 5.0;
393 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
394 | };
395 | name = Debug;
396 | };
397 | 331C8089294A63A400263BE5 /* Release */ = {
398 | isa = XCBuildConfiguration;
399 | buildSettings = {
400 | BUNDLE_LOADER = "$(TEST_HOST)";
401 | CODE_SIGN_STYLE = Automatic;
402 | CURRENT_PROJECT_VERSION = 1;
403 | GENERATE_INFOPLIST_FILE = YES;
404 | MARKETING_VERSION = 1.0;
405 | PRODUCT_BUNDLE_IDENTIFIER = io.adaptiv.flutterKit.RunnerTests;
406 | PRODUCT_NAME = "$(TARGET_NAME)";
407 | SWIFT_VERSION = 5.0;
408 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
409 | };
410 | name = Release;
411 | };
412 | 331C808A294A63A400263BE5 /* Profile */ = {
413 | isa = XCBuildConfiguration;
414 | buildSettings = {
415 | BUNDLE_LOADER = "$(TEST_HOST)";
416 | CODE_SIGN_STYLE = Automatic;
417 | CURRENT_PROJECT_VERSION = 1;
418 | GENERATE_INFOPLIST_FILE = YES;
419 | MARKETING_VERSION = 1.0;
420 | PRODUCT_BUNDLE_IDENTIFIER = io.adaptiv.flutterKit.RunnerTests;
421 | PRODUCT_NAME = "$(TARGET_NAME)";
422 | SWIFT_VERSION = 5.0;
423 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
424 | };
425 | name = Profile;
426 | };
427 | 97C147031CF9000F007C117D /* Debug */ = {
428 | isa = XCBuildConfiguration;
429 | buildSettings = {
430 | ALWAYS_SEARCH_USER_PATHS = NO;
431 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
432 | CLANG_ANALYZER_NONNULL = YES;
433 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
434 | CLANG_CXX_LIBRARY = "libc++";
435 | CLANG_ENABLE_MODULES = YES;
436 | CLANG_ENABLE_OBJC_ARC = YES;
437 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
438 | CLANG_WARN_BOOL_CONVERSION = YES;
439 | CLANG_WARN_COMMA = YES;
440 | CLANG_WARN_CONSTANT_CONVERSION = YES;
441 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
442 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
443 | CLANG_WARN_EMPTY_BODY = YES;
444 | CLANG_WARN_ENUM_CONVERSION = YES;
445 | CLANG_WARN_INFINITE_RECURSION = YES;
446 | CLANG_WARN_INT_CONVERSION = YES;
447 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
448 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
449 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
450 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
451 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
452 | CLANG_WARN_STRICT_PROTOTYPES = YES;
453 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
454 | CLANG_WARN_UNREACHABLE_CODE = YES;
455 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
456 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
457 | COPY_PHASE_STRIP = NO;
458 | DEBUG_INFORMATION_FORMAT = dwarf;
459 | ENABLE_STRICT_OBJC_MSGSEND = YES;
460 | ENABLE_TESTABILITY = YES;
461 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
462 | GCC_C_LANGUAGE_STANDARD = gnu99;
463 | GCC_DYNAMIC_NO_PIC = NO;
464 | GCC_NO_COMMON_BLOCKS = YES;
465 | GCC_OPTIMIZATION_LEVEL = 0;
466 | GCC_PREPROCESSOR_DEFINITIONS = (
467 | "DEBUG=1",
468 | "$(inherited)",
469 | );
470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
472 | GCC_WARN_UNDECLARED_SELECTOR = YES;
473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
474 | GCC_WARN_UNUSED_FUNCTION = YES;
475 | GCC_WARN_UNUSED_VARIABLE = YES;
476 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
477 | MTL_ENABLE_DEBUG_INFO = YES;
478 | ONLY_ACTIVE_ARCH = YES;
479 | SDKROOT = iphoneos;
480 | TARGETED_DEVICE_FAMILY = "1,2";
481 | };
482 | name = Debug;
483 | };
484 | 97C147041CF9000F007C117D /* Release */ = {
485 | isa = XCBuildConfiguration;
486 | buildSettings = {
487 | ALWAYS_SEARCH_USER_PATHS = NO;
488 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
489 | CLANG_ANALYZER_NONNULL = YES;
490 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
491 | CLANG_CXX_LIBRARY = "libc++";
492 | CLANG_ENABLE_MODULES = YES;
493 | CLANG_ENABLE_OBJC_ARC = YES;
494 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
495 | CLANG_WARN_BOOL_CONVERSION = YES;
496 | CLANG_WARN_COMMA = YES;
497 | CLANG_WARN_CONSTANT_CONVERSION = YES;
498 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
499 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
500 | CLANG_WARN_EMPTY_BODY = YES;
501 | CLANG_WARN_ENUM_CONVERSION = YES;
502 | CLANG_WARN_INFINITE_RECURSION = YES;
503 | CLANG_WARN_INT_CONVERSION = YES;
504 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
505 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
506 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
507 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
508 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
509 | CLANG_WARN_STRICT_PROTOTYPES = YES;
510 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
511 | CLANG_WARN_UNREACHABLE_CODE = YES;
512 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
513 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
514 | COPY_PHASE_STRIP = NO;
515 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
516 | ENABLE_NS_ASSERTIONS = NO;
517 | ENABLE_STRICT_OBJC_MSGSEND = YES;
518 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
519 | GCC_C_LANGUAGE_STANDARD = gnu99;
520 | GCC_NO_COMMON_BLOCKS = YES;
521 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
522 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
523 | GCC_WARN_UNDECLARED_SELECTOR = YES;
524 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
525 | GCC_WARN_UNUSED_FUNCTION = YES;
526 | GCC_WARN_UNUSED_VARIABLE = YES;
527 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
528 | MTL_ENABLE_DEBUG_INFO = NO;
529 | SDKROOT = iphoneos;
530 | SUPPORTED_PLATFORMS = iphoneos;
531 | SWIFT_COMPILATION_MODE = wholemodule;
532 | SWIFT_OPTIMIZATION_LEVEL = "-O";
533 | TARGETED_DEVICE_FAMILY = "1,2";
534 | VALIDATE_PRODUCT = YES;
535 | };
536 | name = Release;
537 | };
538 | 97C147061CF9000F007C117D /* Debug */ = {
539 | isa = XCBuildConfiguration;
540 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
541 | buildSettings = {
542 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
543 | CLANG_ENABLE_MODULES = YES;
544 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
545 | DEVELOPMENT_TEAM = G2KAKX49M6;
546 | ENABLE_BITCODE = NO;
547 | INFOPLIST_FILE = Runner/Info.plist;
548 | LD_RUNPATH_SEARCH_PATHS = (
549 | "$(inherited)",
550 | "@executable_path/Frameworks",
551 | );
552 | PRODUCT_BUNDLE_IDENTIFIER = io.adaptiv.flutterKit;
553 | PRODUCT_NAME = "$(TARGET_NAME)";
554 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
555 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
556 | SWIFT_VERSION = 5.0;
557 | VERSIONING_SYSTEM = "apple-generic";
558 | };
559 | name = Debug;
560 | };
561 | 97C147071CF9000F007C117D /* Release */ = {
562 | isa = XCBuildConfiguration;
563 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
564 | buildSettings = {
565 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
566 | CLANG_ENABLE_MODULES = YES;
567 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
568 | DEVELOPMENT_TEAM = G2KAKX49M6;
569 | ENABLE_BITCODE = NO;
570 | INFOPLIST_FILE = Runner/Info.plist;
571 | LD_RUNPATH_SEARCH_PATHS = (
572 | "$(inherited)",
573 | "@executable_path/Frameworks",
574 | );
575 | PRODUCT_BUNDLE_IDENTIFIER = io.adaptiv.flutterKit;
576 | PRODUCT_NAME = "$(TARGET_NAME)";
577 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
578 | SWIFT_VERSION = 5.0;
579 | VERSIONING_SYSTEM = "apple-generic";
580 | };
581 | name = Release;
582 | };
583 | /* End XCBuildConfiguration section */
584 |
585 | /* Begin XCConfigurationList section */
586 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
587 | isa = XCConfigurationList;
588 | buildConfigurations = (
589 | 331C8088294A63A400263BE5 /* Debug */,
590 | 331C8089294A63A400263BE5 /* Release */,
591 | 331C808A294A63A400263BE5 /* Profile */,
592 | );
593 | defaultConfigurationIsVisible = 0;
594 | defaultConfigurationName = Release;
595 | };
596 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
597 | isa = XCConfigurationList;
598 | buildConfigurations = (
599 | 97C147031CF9000F007C117D /* Debug */,
600 | 97C147041CF9000F007C117D /* Release */,
601 | 249021D3217E4FDB00AE95B9 /* Profile */,
602 | );
603 | defaultConfigurationIsVisible = 0;
604 | defaultConfigurationName = Release;
605 | };
606 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
607 | isa = XCConfigurationList;
608 | buildConfigurations = (
609 | 97C147061CF9000F007C117D /* Debug */,
610 | 97C147071CF9000F007C117D /* Release */,
611 | 249021D4217E4FDB00AE95B9 /* Profile */,
612 | );
613 | defaultConfigurationIsVisible = 0;
614 | defaultConfigurationName = Release;
615 | };
616 | /* End XCConfigurationList section */
617 | };
618 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
619 | }
620 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
64 |
66 |
72 |
73 |
74 |
75 |
81 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 |
4 | @main
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevenosse/flutter_kit/e6420550fb124650272cc33f54fb4a23244800f4/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 | CFBundleDisplayName
8 | Flutter Kit
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | flutter_kit
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/gen/assets.gen.dart:
--------------------------------------------------------------------------------
1 | /// GENERATED CODE - DO NOT MODIFY BY HAND
2 | /// *****************************************************
3 | /// FlutterGen
4 | /// *****************************************************
5 |
6 | // coverage:ignore-file
7 | // ignore_for_file: type=lint
8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
9 |
10 | import 'package:flutter/widgets.dart';
11 |
12 | class $AssetsImagesGen {
13 | const $AssetsImagesGen();
14 |
15 | /// File path: assets/images/apple-logo.svg
16 | String get appleLogo => 'assets/images/apple-logo.svg';
17 |
18 | /// File path: assets/images/google-logo.svg
19 | String get googleLogo => 'assets/images/google-logo.svg';
20 |
21 | /// List of all assets
22 | List get values => [appleLogo, googleLogo];
23 | }
24 |
25 | class Assets {
26 | Assets._();
27 |
28 | static const $AssetsImagesGen images = $AssetsImagesGen();
29 | }
30 |
31 | class AssetGenImage {
32 | const AssetGenImage(this._assetName);
33 |
34 | final String _assetName;
35 |
36 | Image image({
37 | Key? key,
38 | AssetBundle? bundle,
39 | ImageFrameBuilder? frameBuilder,
40 | ImageErrorWidgetBuilder? errorBuilder,
41 | String? semanticLabel,
42 | bool excludeFromSemantics = false,
43 | double? scale,
44 | double? width,
45 | double? height,
46 | Color? color,
47 | Animation? opacity,
48 | BlendMode? colorBlendMode,
49 | BoxFit? fit,
50 | AlignmentGeometry alignment = Alignment.center,
51 | ImageRepeat repeat = ImageRepeat.noRepeat,
52 | Rect? centerSlice,
53 | bool matchTextDirection = false,
54 | bool gaplessPlayback = false,
55 | bool isAntiAlias = false,
56 | String? package,
57 | FilterQuality filterQuality = FilterQuality.low,
58 | int? cacheWidth,
59 | int? cacheHeight,
60 | }) {
61 | return Image.asset(
62 | _assetName,
63 | key: key,
64 | bundle: bundle,
65 | frameBuilder: frameBuilder,
66 | errorBuilder: errorBuilder,
67 | semanticLabel: semanticLabel,
68 | excludeFromSemantics: excludeFromSemantics,
69 | scale: scale,
70 | width: width,
71 | height: height,
72 | color: color,
73 | opacity: opacity,
74 | colorBlendMode: colorBlendMode,
75 | fit: fit,
76 | alignment: alignment,
77 | repeat: repeat,
78 | centerSlice: centerSlice,
79 | matchTextDirection: matchTextDirection,
80 | gaplessPlayback: gaplessPlayback,
81 | isAntiAlias: isAntiAlias,
82 | package: package,
83 | filterQuality: filterQuality,
84 | cacheWidth: cacheWidth,
85 | cacheHeight: cacheHeight,
86 | );
87 | }
88 |
89 | ImageProvider provider({
90 | AssetBundle? bundle,
91 | String? package,
92 | }) {
93 | return AssetImage(
94 | _assetName,
95 | bundle: bundle,
96 | package: package,
97 | );
98 | }
99 |
100 | String get path => _assetName;
101 |
102 | String get keyName => _assetName;
103 | }
104 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_kit/src/core/app_initializer.dart';
5 | import 'package:flutter_kit/src/core/application.dart';
6 |
7 | void main() {
8 | final AppInitializer appInitializer = AppInitializer();
9 |
10 | runZonedGuarded(
11 | () async {
12 | WidgetsFlutterBinding.ensureInitialized();
13 |
14 | await appInitializer.preAppRun();
15 |
16 | runApp(Application());
17 |
18 | appInitializer.postAppRun();
19 | },
20 | (error, stack) {},
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/core/app_initializer.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:flutter_kit/src/shared/locator.dart';
5 | import 'package:flutter_kit/src/shared/services/storage/storage.dart';
6 |
7 | class AppInitializer {
8 | /// Initialize services, plugins, etc. before the app runs.
9 | Future preAppRun() async {
10 | await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
11 |
12 | await locator().init();
13 | }
14 |
15 | /// Initialize services, plugins, etc. after the app runs.
16 | Future postAppRun() async {
17 | // Hide RSOD in release mode.
18 | if (kReleaseMode) {
19 | ErrorWidget.builder = (FlutterErrorDetails details) => const SizedBox();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/core/application.dart:
--------------------------------------------------------------------------------
1 | import 'package:auto_route/auto_route.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_kit/src/core/environment.dart';
4 | import 'package:flutter_kit/src/core/i18n/l10n.dart';
5 | import 'package:flutter_kit/src/core/routing/app_router.dart';
6 | import 'package:flutter_kit/src/core/theme/app_theme.dart';
7 | import 'package:flutter_kit/src/shared/locator.dart';
8 | import 'package:flutter_localizations/flutter_localizations.dart';
9 |
10 | class Application extends StatelessWidget {
11 | final AppRouter _appRouter;
12 |
13 | Application({
14 | super.key,
15 | AppRouter? appRouter,
16 | }) : _appRouter = appRouter ?? locator();
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return MaterialApp.router(
21 | title: Environment.appName,
22 | routerConfig: _appRouter.config(
23 | navigatorObservers: () => [
24 | AutoRouteObserver(),
25 | ],
26 | ),
27 | theme: AppTheme.lightTheme,
28 | darkTheme: AppTheme.darkTheme,
29 | debugShowCheckedModeBanner: false,
30 | localizationsDelegates: const [
31 | I18n.delegate,
32 | GlobalMaterialLocalizations.delegate,
33 | GlobalWidgetsLocalizations.delegate,
34 | GlobalCupertinoLocalizations.delegate,
35 | ],
36 | supportedLocales: I18n.delegate.supportedLocales,
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/src/core/environment.dart:
--------------------------------------------------------------------------------
1 | class Environment {
2 | static const String environment = String.fromEnvironment('env', defaultValue: 'dev');
3 | static const String baseUrl =
4 | String.fromEnvironment('base_url', defaultValue: 'https://jsonplaceholder.typicode.com');
5 | static const String appName = String.fromEnvironment('app_name', defaultValue: 'Flutter Kit');
6 | }
7 |
--------------------------------------------------------------------------------
/lib/src/core/i18n/intl/messages_all.dart:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
2 | // This is a library that looks up messages for specific locales by
3 | // delegating to the appropriate library.
4 |
5 | // Ignore issues from commonly used lints in this file.
6 | // ignore_for_file:implementation_imports, file_names, unnecessary_new
7 | // ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
8 | // ignore_for_file:argument_type_not_assignable, invalid_assignment
9 | // ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
10 | // ignore_for_file:comment_references
11 |
12 | import 'dart:async';
13 |
14 | import 'package:flutter/foundation.dart';
15 | import 'package:intl/intl.dart';
16 | import 'package:intl/message_lookup_by_library.dart';
17 | import 'package:intl/src/intl_helpers.dart';
18 |
19 | import 'messages_en.dart' as messages_en;
20 |
21 | typedef Future LibraryLoader();
22 | Map _deferredLibraries = {
23 | 'en': () => new SynchronousFuture(null),
24 | };
25 |
26 | MessageLookupByLibrary? _findExact(String localeName) {
27 | switch (localeName) {
28 | case 'en':
29 | return messages_en.messages;
30 | default:
31 | return null;
32 | }
33 | }
34 |
35 | /// User programs should call this before using [localeName] for messages.
36 | Future initializeMessages(String localeName) {
37 | var availableLocale = Intl.verifiedLocale(
38 | localeName,
39 | (locale) => _deferredLibraries[locale] != null,
40 | onFailure: (_) => null,
41 | );
42 | if (availableLocale == null) {
43 | return new SynchronousFuture(false);
44 | }
45 | var lib = _deferredLibraries[availableLocale];
46 | lib == null ? new SynchronousFuture(false) : lib();
47 | initializeInternalMessageLookup(() => new CompositeMessageLookup());
48 | messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
49 | return new SynchronousFuture(true);
50 | }
51 |
52 | bool _messagesExistFor(String locale) {
53 | try {
54 | return _findExact(locale) != null;
55 | } catch (e) {
56 | return false;
57 | }
58 | }
59 |
60 | MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
61 | var actualLocale = Intl.verifiedLocale(
62 | locale,
63 | _messagesExistFor,
64 | onFailure: (_) => null,
65 | );
66 | if (actualLocale == null) return null;
67 | return _findExact(actualLocale);
68 | }
69 |
--------------------------------------------------------------------------------
/lib/src/core/i18n/intl/messages_en.dart:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
2 | // This is a library that provides messages for a en locale. All the
3 | // messages from the main program should be duplicated here with the same
4 | // function name.
5 |
6 | // Ignore issues from commonly used lints in this file.
7 | // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
8 | // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
9 | // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
10 | // ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes
11 | // ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes
12 |
13 | import 'package:intl/intl.dart';
14 | import 'package:intl/message_lookup_by_library.dart';
15 |
16 | final messages = new MessageLookup();
17 |
18 | typedef String MessageIfAbsent(String messageStr, List args);
19 |
20 | class MessageLookup extends MessageLookupByLibrary {
21 | String get localeName => 'en';
22 |
23 | final messages = _notInlinedMessages(_notInlinedMessages);
24 | static Map _notInlinedMessages(_) => {
25 | "dialog_cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
26 | "dialog_confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
27 | "loadingDialog_content": MessageLookupByLibrary.simpleMessage(
28 | "Please wait...",
29 | ),
30 | "login_appleBtnLabel": MessageLookupByLibrary.simpleMessage(
31 | "Sign in with Apple",
32 | ),
33 | "login_emailHint": MessageLookupByLibrary.simpleMessage(
34 | "Ex: KpNqg@example.com",
35 | ),
36 | "login_emailLabel": MessageLookupByLibrary.simpleMessage("Email"),
37 | "login_forgotPasswordLabel": MessageLookupByLibrary.simpleMessage(
38 | "Forgot password?",
39 | ),
40 | "login_googleBtnLabel": MessageLookupByLibrary.simpleMessage(
41 | "Sign in with Google",
42 | ),
43 | "login_passwordHint": MessageLookupByLibrary.simpleMessage("************"),
44 | "login_passwordLabel": MessageLookupByLibrary.simpleMessage("Password"),
45 | "login_submitBtnLabel": MessageLookupByLibrary.simpleMessage("Login"),
46 | "login_subtitle": MessageLookupByLibrary.simpleMessage(
47 | "Let\'s continue where we left off.",
48 | ),
49 | "login_title": MessageLookupByLibrary.simpleMessage("Login"),
50 | "or": MessageLookupByLibrary.simpleMessage("OR"),
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/lib/src/core/i18n/l10n.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 | import 'package:flutter/material.dart';
3 | import 'package:intl/intl.dart';
4 | import 'intl/messages_all.dart';
5 |
6 | // **************************************************************************
7 | // Generator: Flutter Intl IDE plugin
8 | // Made by Localizely
9 | // **************************************************************************
10 |
11 | // ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
12 | // ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
13 | // ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes
14 |
15 | class I18n {
16 | I18n();
17 |
18 | static I18n? _current;
19 |
20 | static I18n get current {
21 | assert(
22 | _current != null,
23 | 'No instance of I18n was loaded. Try to initialize the I18n delegate before accessing I18n.current.',
24 | );
25 | return _current!;
26 | }
27 |
28 | static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
29 |
30 | static Future load(Locale locale) {
31 | final name = (locale.countryCode?.isEmpty ?? false)
32 | ? locale.languageCode
33 | : locale.toString();
34 | final localeName = Intl.canonicalizedLocale(name);
35 | return initializeMessages(localeName).then((_) {
36 | Intl.defaultLocale = localeName;
37 | final instance = I18n();
38 | I18n._current = instance;
39 |
40 | return instance;
41 | });
42 | }
43 |
44 | static I18n of(BuildContext context) {
45 | final instance = I18n.maybeOf(context);
46 | assert(
47 | instance != null,
48 | 'No instance of I18n present in the widget tree. Did you add I18n.delegate in localizationsDelegates?',
49 | );
50 | return instance!;
51 | }
52 |
53 | static I18n? maybeOf(BuildContext context) {
54 | return Localizations.of(context, I18n);
55 | }
56 |
57 | /// `Login`
58 | String get login_title {
59 | return Intl.message('Login', name: 'login_title', desc: '', args: []);
60 | }
61 |
62 | /// `Let's continue where we left off.`
63 | String get login_subtitle {
64 | return Intl.message(
65 | 'Let\'s continue where we left off.',
66 | name: 'login_subtitle',
67 | desc: '',
68 | args: [],
69 | );
70 | }
71 |
72 | /// `Email`
73 | String get login_emailLabel {
74 | return Intl.message('Email', name: 'login_emailLabel', desc: '', args: []);
75 | }
76 |
77 | /// `Ex: KpNqg@example.com`
78 | String get login_emailHint {
79 | return Intl.message(
80 | 'Ex: KpNqg@example.com',
81 | name: 'login_emailHint',
82 | desc: '',
83 | args: [],
84 | );
85 | }
86 |
87 | /// `Password`
88 | String get login_passwordLabel {
89 | return Intl.message(
90 | 'Password',
91 | name: 'login_passwordLabel',
92 | desc: '',
93 | args: [],
94 | );
95 | }
96 |
97 | /// `************`
98 | String get login_passwordHint {
99 | return Intl.message(
100 | '************',
101 | name: 'login_passwordHint',
102 | desc: '',
103 | args: [],
104 | );
105 | }
106 |
107 | /// `Forgot password?`
108 | String get login_forgotPasswordLabel {
109 | return Intl.message(
110 | 'Forgot password?',
111 | name: 'login_forgotPasswordLabel',
112 | desc: '',
113 | args: [],
114 | );
115 | }
116 |
117 | /// `Sign in with Google`
118 | String get login_googleBtnLabel {
119 | return Intl.message(
120 | 'Sign in with Google',
121 | name: 'login_googleBtnLabel',
122 | desc: '',
123 | args: [],
124 | );
125 | }
126 |
127 | /// `Sign in with Apple`
128 | String get login_appleBtnLabel {
129 | return Intl.message(
130 | 'Sign in with Apple',
131 | name: 'login_appleBtnLabel',
132 | desc: '',
133 | args: [],
134 | );
135 | }
136 |
137 | /// `Login`
138 | String get login_submitBtnLabel {
139 | return Intl.message(
140 | 'Login',
141 | name: 'login_submitBtnLabel',
142 | desc: '',
143 | args: [],
144 | );
145 | }
146 |
147 | /// `Please wait...`
148 | String get loadingDialog_content {
149 | return Intl.message(
150 | 'Please wait...',
151 | name: 'loadingDialog_content',
152 | desc: '',
153 | args: [],
154 | );
155 | }
156 |
157 | /// `Cancel`
158 | String get dialog_cancel {
159 | return Intl.message('Cancel', name: 'dialog_cancel', desc: '', args: []);
160 | }
161 |
162 | /// `Confirm`
163 | String get dialog_confirm {
164 | return Intl.message('Confirm', name: 'dialog_confirm', desc: '', args: []);
165 | }
166 |
167 | /// `OR`
168 | String get or {
169 | return Intl.message('OR', name: 'or', desc: '', args: []);
170 | }
171 | }
172 |
173 | class AppLocalizationDelegate extends LocalizationsDelegate {
174 | const AppLocalizationDelegate();
175 |
176 | List get supportedLocales {
177 | return const [Locale.fromSubtags(languageCode: 'en')];
178 | }
179 |
180 | @override
181 | bool isSupported(Locale locale) => _isSupported(locale);
182 | @override
183 | Future load(Locale locale) => I18n.load(locale);
184 | @override
185 | bool shouldReload(AppLocalizationDelegate old) => false;
186 |
187 | bool _isSupported(Locale locale) {
188 | for (var supportedLocale in supportedLocales) {
189 | if (supportedLocale.languageCode == locale.languageCode) {
190 | return true;
191 | }
192 | }
193 | return false;
194 | }
195 | }
196 |
--------------------------------------------------------------------------------
/lib/src/core/i18n/l10n/intl_en.arb:
--------------------------------------------------------------------------------
1 | {
2 | "@@locale": "en",
3 |
4 | "login_title": "Login",
5 | "login_subtitle": "Let's continue where we left off.",
6 | "login_emailLabel": "Email",
7 | "login_emailHint": "Ex: KpNqg@example.com",
8 | "login_passwordLabel": "Password",
9 | "login_passwordHint": "************",
10 | "login_forgotPasswordLabel": "Forgot password?",
11 | "login_googleBtnLabel": "Sign in with Google",
12 | "login_appleBtnLabel": "Sign in with Apple",
13 | "login_submitBtnLabel": "Login",
14 |
15 | "loadingDialog_content": "Please wait...",
16 |
17 | "dialog_cancel": "Cancel",
18 | "dialog_confirm": "Confirm",
19 |
20 | "or": "OR"
21 | }
--------------------------------------------------------------------------------
/lib/src/core/routing/app_router.dart:
--------------------------------------------------------------------------------
1 | import 'package:auto_route/auto_route.dart';
2 | import 'package:flutter_kit/src/features/login/ui/login_screen.dart';
3 |
4 | part 'app_router.gr.dart';
5 |
6 | @AutoRouterConfig(replaceInRouteName: 'Screen,Route')
7 | class AppRouter extends RootStackRouter {
8 | @override
9 | List routes = [
10 | AutoRoute(page: LoginRoute.page, initial: true),
11 | ];
12 | }
13 |
--------------------------------------------------------------------------------
/lib/src/core/routing/app_router.gr.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | // GENERATED CODE - DO NOT MODIFY BY HAND
3 |
4 | // **************************************************************************
5 | // AutoRouterGenerator
6 | // **************************************************************************
7 |
8 | // ignore_for_file: type=lint
9 | // coverage:ignore-file
10 |
11 | part of 'app_router.dart';
12 |
13 | /// generated route for
14 | /// [LoginScreen]
15 | class LoginRoute extends PageRouteInfo {
16 | const LoginRoute({List? children})
17 | : super(LoginRoute.name, initialChildren: children);
18 |
19 | static const String name = 'LoginRoute';
20 |
21 | static PageInfo page = PageInfo(
22 | name,
23 | builder: (data) {
24 | return WrappedRoute(child: const LoginScreen());
25 | },
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/core/theme/app_theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_kit/src/core/theme/color_schemes.dart';
3 | import 'package:flutter_kit/src/core/theme/custom_colors.dart';
4 |
5 | class AppTheme {
6 | static const _fontFamily = 'GeneralSans';
7 |
8 | static ThemeData _buildTheme({required Brightness brightness}) {
9 | final ColorScheme colors = brightness == Brightness.light ? lightColorScheme : darkColorScheme;
10 |
11 | return ThemeData(
12 | useMaterial3: true,
13 | textTheme: _buildTextTheme(colors: colors),
14 | appBarTheme: AppBarTheme(
15 | surfaceTintColor: Colors.transparent,
16 | backgroundColor: colors.surface,
17 | ),
18 | cardTheme: CardThemeData(
19 | color: colors.surface,
20 | shadowColor: colors.shadow.withValues(alpha: .5),
21 | ),
22 | colorScheme: colors,
23 | extensions: [brightness == Brightness.light ? CustomColors.light : CustomColors.dark],
24 | );
25 | }
26 |
27 | static TextTheme _buildTextTheme({required ColorScheme colors}) {
28 | return TextTheme(
29 | displayLarge: TextStyle(
30 | fontFamily: _fontFamily,
31 | fontWeight: FontWeight.w700,
32 | fontSize: 32,
33 | color: colors.onSurface,
34 | ),
35 | headlineLarge: TextStyle(
36 | fontFamily: _fontFamily,
37 | fontWeight: FontWeight.w700,
38 | fontSize: 28,
39 | color: colors.onSurface,
40 | ),
41 | titleLarge: TextStyle(
42 | fontFamily: _fontFamily,
43 | fontWeight: FontWeight.bold,
44 | fontSize: 24,
45 | color: colors.onSurface,
46 | ),
47 | titleMedium: TextStyle(
48 | fontFamily: _fontFamily,
49 | fontWeight: FontWeight.w700,
50 | fontSize: 20,
51 | color: colors.onSurface,
52 | ),
53 | titleSmall: TextStyle(
54 | fontFamily: _fontFamily,
55 | fontWeight: FontWeight.w700,
56 | fontSize: 18,
57 | color: colors.onSurface,
58 | ),
59 | bodyLarge: TextStyle(
60 | fontFamily: _fontFamily,
61 | fontWeight: FontWeight.w600,
62 | fontSize: 16,
63 | color: colors.onSurface,
64 | ),
65 | bodyMedium: TextStyle(
66 | fontFamily: _fontFamily,
67 | fontWeight: FontWeight.w500,
68 | fontSize: 16,
69 | color: colors.onSurface,
70 | ),
71 | bodySmall: TextStyle(
72 | fontFamily: _fontFamily,
73 | fontWeight: FontWeight.w500,
74 | fontSize: 14,
75 | color: colors.onSurface,
76 | ),
77 | labelLarge: TextStyle(
78 | fontFamily: _fontFamily,
79 | fontWeight: FontWeight.w500,
80 | fontSize: 14,
81 | color: colors.onSurface,
82 | ),
83 | labelMedium: TextStyle(
84 | fontFamily: _fontFamily,
85 | fontWeight: FontWeight.w500,
86 | fontSize: 14,
87 | color: colors.onSurface,
88 | ),
89 | labelSmall: TextStyle(
90 | fontFamily: _fontFamily,
91 | fontWeight: FontWeight.w500,
92 | fontSize: 10,
93 | color: colors.onSurface,
94 | ),
95 | );
96 | }
97 |
98 | static final ThemeData lightTheme = _buildTheme(brightness: Brightness.light);
99 |
100 | static final ThemeData darkTheme = _buildTheme(brightness: Brightness.dark);
101 | }
102 |
--------------------------------------------------------------------------------
/lib/src/core/theme/color_scheme_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'custom_colors.dart';
3 |
4 | extension ColorSchemeExtension on ColorScheme {
5 | CustomColors get custom => brightness == Brightness.light ? CustomColors.light : CustomColors.dark;
6 |
7 | // For ease of use, creating extensions for custom colors
8 | Color get success => custom.success;
9 | Color get onSuccess => custom.onSuccess;
10 | }
11 |
--------------------------------------------------------------------------------
/lib/src/core/theme/color_schemes.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const lightColorScheme = ColorScheme(
4 | brightness: Brightness.light,
5 | primary: Color(0xFF6750A4),
6 | onPrimary: Color(0xFFFFFFFF),
7 | primaryContainer: Color(0xFFEADDFF),
8 | onPrimaryContainer: Color(0xFF21005D),
9 | secondary: Color(0xFF625B71),
10 | onSecondary: Color(0xFFFFFFFF),
11 | secondaryContainer: Color(0xFFE8DEF8),
12 | onSecondaryContainer: Color(0xFF1D192B),
13 | tertiary: Color(0xFF7D5260),
14 | onTertiary: Color(0xFFFFFFFF),
15 | tertiaryContainer: Color(0xFFFFD8E4),
16 | onTertiaryContainer: Color(0xFF31111D),
17 | error: Color(0xFFB3261E),
18 | onError: Color(0xFFFFFFFF),
19 | errorContainer: Color(0xFFF9DEDC),
20 | onErrorContainer: Color(0xFF410E0B),
21 | outline: Color(0xFF79747E),
22 | surface: Color(0XFFF4F4F5),
23 | onSurface: Color(0XFF09090B),
24 | onSurfaceVariant: Color(0xFF49454F),
25 | inverseSurface: Color(0xFF313033),
26 | onInverseSurface: Color(0xFFF4EFF4),
27 | inversePrimary: Color(0xFFD0BCFF),
28 | shadow: Color(0xFF000000),
29 | surfaceTint: Color(0xFF6750A4),
30 | outlineVariant: Color(0xFFCAC4D0),
31 | scrim: Color(0xFF000000),
32 | );
33 |
34 | const darkColorScheme = ColorScheme(
35 | brightness: Brightness.dark,
36 | primary: Color(0xFFD0BCFF),
37 | onPrimary: Color(0xFF381E72),
38 | primaryContainer: Color(0xFF4F378B),
39 | onPrimaryContainer: Color(0xFFEADDFF),
40 | secondary: Color(0xFFCCC2DC),
41 | onSecondary: Color(0xFF332D41),
42 | secondaryContainer: Color(0xFF4A4458),
43 | onSecondaryContainer: Color(0xFFE8DEF8),
44 | tertiary: Color(0xFFEFB8C8),
45 | onTertiary: Color(0xFF492532),
46 | tertiaryContainer: Color(0xFF633B48),
47 | onTertiaryContainer: Color(0xFFFFD8E4),
48 | error: Color(0xFFF2B8B5),
49 | onError: Color(0xFF601410),
50 | errorContainer: Color(0xFF8C1D18),
51 | onErrorContainer: Color(0xFFF9DEDC),
52 | outline: Color(0xFF938F99),
53 | surface: Color.fromARGB(255, 37, 37, 41),
54 | onSurface: Color.fromARGB(255, 226, 227, 216),
55 | onSurfaceVariant: Color(0xFFCAC4D0),
56 | inverseSurface: Color(0xFFE6E1E5),
57 | onInverseSurface: Color(0xFF313033),
58 | inversePrimary: Color(0xFF6750A4),
59 | shadow: Color(0xFF000000),
60 | surfaceTint: Color(0xFFD0BCFF),
61 | outlineVariant: Color(0xFF49454F),
62 | scrim: Color(0xFF000000),
63 | );
64 |
--------------------------------------------------------------------------------
/lib/src/core/theme/custom_colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | @immutable
4 | class CustomColors extends ThemeExtension {
5 | final Color success;
6 | final Color onSuccess;
7 |
8 | const CustomColors({
9 | required this.success,
10 | required this.onSuccess,
11 | });
12 |
13 | @override
14 | CustomColors copyWith({
15 | Color? success,
16 | Color? onSuccess,
17 | }) {
18 | return CustomColors(
19 | success: success ?? this.success,
20 | onSuccess: onSuccess ?? this.onSuccess,
21 | );
22 | }
23 |
24 | @override
25 | CustomColors lerp(ThemeExtension? other, double t) {
26 | if (other is! CustomColors) {
27 | return this;
28 | }
29 | return CustomColors(
30 | success: Color.lerp(success, other.success, t)!,
31 | onSuccess: Color.lerp(onSuccess, other.onSuccess, t)!,
32 | );
33 | }
34 |
35 | static const light = CustomColors(
36 | success: Color(0xFF4CAF50),
37 | onSuccess: Color(0xFFFFFFFF),
38 | );
39 |
40 | static const dark = CustomColors(
41 | success: Color(0xFF81C784),
42 | onSuccess: Color(0xFF1B5E20),
43 | );
44 | }
--------------------------------------------------------------------------------
/lib/src/core/theme/dimens.dart:
--------------------------------------------------------------------------------
1 | class Dimens {
2 | static const double minSpacing = 4.0;
3 | static const double halfSpacing = 8.0;
4 | static const double spacing = 16.0;
5 | static const double doubleSpacing = 32.0;
6 | static const double tripleSpacing = 48.0;
7 |
8 | static const double radius = 12.0;
9 | static const double doubleRadius = 24.0;
10 | static const double fullRadius = 999.0;
11 |
12 | static const double iconSize = 24.0;
13 | static const double iconSizeM = 20.0;
14 | static const double iconSizeS = 18.0;
15 |
16 | static const double loaderSize = 25.0;
17 | }
18 |
--------------------------------------------------------------------------------
/lib/src/datasource/http/dio_config.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 |
3 | import 'package:dio/dio.dart';
4 | import 'package:flutter_kit/src/core/environment.dart';
5 |
6 | final _logInterceptor = LogInterceptor(
7 | logPrint: (object) => log(object.toString()),
8 | request: true,
9 | requestHeader: true,
10 | requestBody: true,
11 | responseBody: true,
12 | );
13 |
14 | class DioConfig {
15 | final Dio dio;
16 |
17 | DioConfig({Dio? dio})
18 | : dio = dio ??
19 | Dio(
20 | BaseOptions(
21 | baseUrl: Environment.baseUrl,
22 | headers: {
23 | 'Accept': 'application/json',
24 | },
25 | contentType: 'application/json',
26 | ),
27 | ) {
28 | this.dio.interceptors.add(_logInterceptor);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/datasource/http/example_api.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | class ExampleApi {
4 | final Dio dio;
5 |
6 | ExampleApi({required this.dio});
7 |
8 | Future getExample() async {
9 | await Future.delayed(const Duration(seconds: 2));
10 | return 'Example';
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/src/datasource/http/http_util.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter_kit/src/datasource/models/api_response/api_response.dart';
3 |
4 | ApiError createApiErrorFromDioError(DioException error) {
5 | return ApiError(
6 | type: _getTypeFromDioError(error),
7 | statusCode: error.response?.statusCode ?? 0,
8 | error: error,
9 | );
10 | }
11 |
12 | ApiError unknownError(Object? e) {
13 | return ApiError(
14 | error: e,
15 | statusCode: 0,
16 | type: ApiErrorType.unknown,
17 | );
18 | }
19 |
20 | ApiErrorType _getTypeFromDioError(DioException error) {
21 | if (error.response?.statusCode.toString().startsWith('5') ?? false) {
22 | return ApiErrorType.server;
23 | } else if (error.response?.statusCode.toString().startsWith('4') ?? false) {
24 | return ApiErrorType.user;
25 | } else if (error.response == null) {
26 | return ApiErrorType.network;
27 | }
28 | return ApiErrorType.unknown;
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/datasource/models/api_response/api_response.dart:
--------------------------------------------------------------------------------
1 | import 'package:equatable/equatable.dart';
2 |
3 | sealed class ApiResponse {
4 | const ApiResponse();
5 |
6 | factory ApiResponse.success(R response) = ApiResponseSuccess;
7 | factory ApiResponse.error(E response) = ApiResponseError;
8 |
9 | void when({
10 | required void Function(R data) success,
11 | required void Function(E error) error,
12 | }) {
13 | switch (this) {
14 | case ApiResponseSuccess success_:
15 | success(success_.response);
16 | case ApiResponseError error_:
17 | error(error_.response);
18 | }
19 | }
20 | }
21 |
22 | final class ApiResponseSuccess extends ApiResponse {
23 | final R response;
24 |
25 | const ApiResponseSuccess(this.response);
26 | }
27 |
28 | final class ApiResponseError extends ApiResponse {
29 | final E response;
30 |
31 | const ApiResponseError(this.response);
32 | }
33 |
34 | enum ApiErrorType {
35 | /// Something went wrong on the server side
36 | server,
37 |
38 | /// Something's wrong with the network request
39 | network,
40 |
41 | /// User did something wrong
42 | user,
43 |
44 | /// The error is unidentified
45 | unknown,
46 | }
47 |
48 | class ApiError extends Equatable {
49 | final ApiErrorType type;
50 | final int statusCode;
51 | final T error;
52 |
53 | const ApiError({
54 | required this.type,
55 | required this.error,
56 | required this.statusCode,
57 | });
58 |
59 | @override
60 | List