Fork this project then start you project with a lot of stuck prepare
Base project made with much: . Contains Bloc, Route, and much more!
- Flutter: >=3.7.0 <4.0.0
- Firebase staging
- Firebase prod
- Download or clone this repo by using the link below:
https://github.com/GoldenOwlAsia/mobile-flutter-template.git
- Go to project root and execute the following command in console to get the required dependencies:
flutter pub get
- Now run the generator
flutter packages pub run build_runner build
- To run staging project
flutter run --flavor staging --target lib/main_staging.dart
- To run production project
flutter run --flavor production --target lib/main_production.dart
- Download or clone this repo by using the link below:
https://github.com/GoldenOwlAsia/mobile-flutter-template.git
- Go to project root and execute the following command in console to update this project config
sudo sh initialize.sh
- Remove git, update readme
- Change your app-name in
pubspec.yaml
- Change your app builder id (iOS & Android)
- Update your appID
- Replace/Update your firebase config as your project.
- Android staging:
android/app/src/staging/google-services.json
- Android production:
android/app/src/production/google-services.json
- iOS staging:
ios/config/GoogleService-Info.plist
- iOS production:
ios/config/GoogleService-Info.plist
- Update
firebase_options_prod.dart
- Update
firebase_options_stg.dart
- Android staging:
-
In Flutter, Modularization will be done at a file level. While building widgets, we have to make sure they stay independent and re-usable as maximum. Ideally, widgets should be easily extractable into an independent project.
-
Must know
- Model name start with
M
: MUser, MProduct, MGroup... - Common widget start with
X
: XButton, XText, XAppbar... - There widget under folderlib/widgets/
- App Constants class or service start with
Add
: AppStyles, AppColor, AppRouter, AppCoordinator,.. and UserPrefs
- Model name start with
-
logger: Small, easy to use and extensible logger which prints beautiful logs.
-
url_launcher: A Flutter plugin for launching a URL in the mobile platform. Supports iOS, Android, web, Windows, macOS, and Linux.
-
auto_route: Auto route generator, Manager router
-
get_it: This is a simple Service Locator
-
intl: This package provides internationalization and localization facilities, including message translation, plurals and genders, date/number formatting and parsing, and bidirectional text.
-
shared_preferences: Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
-
package_info_plus: This Flutter plugin provides an API for querying information about an application package.
-
device_info_plus: Get current device information from within the Flutter application.
-
permission_handler: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
- http: A composable, Future-based library for making HTTP requests.
The official Firebase plugins for Flutter. sign_in, analytics, crashlytics, storage, firestore
State Management is still the hottest topic in Flutter Community. There are tons of choices available and it’s super intimidating for a beginner to choose one. Also, all of them have their pros and cons. So, what’s the best approach
A recommended approach
- flutter_bloc: Widgets that make it easy to integrate blocs and cubits into Flutter. Learn more
- flutter_gen: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
- localization: Package to simplify in-app translation.
- shimmer: Shimmer loading animation
- flutter_html
- webview_flutter
Here is the core folder structure which flutter provides.
flutter-app/
|- android
|- ios
|- web
|- lib
|- modules
|- test
Here is the folder structure we have been using in this project
lib/
|- packages/
|- src/
|- data/
|- services/
|- feature/
|- dashboard/
|- widget/
|- controller
|- dashboard_screen.dart
|- home/
|- login/
|- plugins/
|- routing/
|- widgets/
|- button/
|- image/
|- view/
|- main.dart
|- modules
Checkout wiki for more info
Account | Profile | Login |
---|---|---|