This is a highly adaptable Flutter starter kit, designed with an ideal layout and equipped with libraries that can be utilized in a wide variety of applications.
To utilize this repository, simply click on the "Use this template" button. The subsequent instructions will guide you through the process of integrating and deploying this starter within your projects.
Remember: Keep your code simple and easy to read. It should be straightforward to test and modify. A bit more effort to achieve this goal is always worthwhile.
Important: A pure architecture based project with SOLID principles. But there are a couple of differences:
- We don't use Entity, DTO (model) takes two responsibilities, as in the future there will be a possibility to use macros.
- We don't use ValueObject as it is only necessary for complex objects that can be used in different parts of the application.
- We don't use UseCase because there is no complex business logic in the project that requires additional processing.
- We don't use GetIt, because it is antipattern. Read more: https://lazebny.io/avoid-these-dart-libraries/#get_it Instead, we use a simple DI container that is easy to maintain and expand.
- 🔥 Included in the ISpect tool
- ✅ Draggable button for route to ISpect page, manage Inspector tools
- ✅ Localizations: ru, en. (I will add more translations in the future.)
- ✅ Talker logger implementation: BLoC, Dio, Routing, Provider
- ✅ Feedback builder
- ✅ Debug tools
- ✅ Cache manager
- ✅ Device and app info
- 🧜 Flexible design, easy to expand, and simple to maintain
- 📦 Collection of reliable and tested libraries
- 🚛 Pre-configured GitHub Actions and GitLab CI
- 🚀 State-of-the-art, feature-oriented architecture
- 📌 Comprehensive documentation with an exciting roadmap ahead
- 🐛 Bug reporting, error tracking, and analytical capabilities
- 😌 Themes and additional amenities
- You must add .env file to .gitignore
- Add you API url and other configs to .env file
- Add fields also to .env.example file
- Configure env in
lib/src/common/configs/env/env.dart
. Like this:
final class Env {
@EnviedField(varName: 'FIELD_NAME', useConstantCase: true)
static const String fieldName = _Env.fieldName;
}
And you can use it:
static const String fieldName = Env.fieldName;
- Go to Settings page
- Tap on the project version 10 times
- You will see the toast modal with options to enable DEV/PROD mode
Simple example of use ISpect
You can manage ISpect using ISpect.read(context)
.
Put this code in your project at an screen and learn how it works. 😊
- Click
Use this template
button - Clone this repository via
git clone
- Run
fvm install
- Run
fvm dart run build_runner build --delete-conflicting-outputs
- Decide which platforms your app will be running on
- Run
chmod a+x automation/bash/create_app.sh && ./automation/bash/create_app.sh --id com.example.app
- Run
fvm flutter pub get
to install all dependencies - Run
fvm flutter run
to run your app - For other tasks (like build bundle, ipa) use:
ctrl + shift + p
->Run Task
This section describes how to add a new dependency to your app. Please, check the initialization section before.
- Open
lib/src/common/di/containers/dependencies.dart
- Add new dependency to
Dependencies
container - Go to
lib/src/feature/initialization/logic/initialization_steps.dart
- Add new entry to the map and write down all the logic needed to initialize your dependency and set it in the
Dependencies
object - Now, you can use the dependency in the app receiving it from context:
context.dependencies.name
You can use template from `very_good_cli``.
Note: use this for android inside settings.gradle
:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
Based on the Sizzle Starter.