A new Flutter project template with Null-safety.
# dev > flutter run # run with Specify entry > flutter run --target ex/exMain.dart # build > flutter build apkstacked: MVVM architectureroutebase onauto_route, Generate using build_runnerservicebase onget_it, stacked_service, for example [NavigationService,DialogService,BottomSheetService,SnackbarService] [ConnectivityService,OpenLinkService,ShareService,FileService,LocalStorageService...]modelbase onbuilt_value,Generate using build_runnerlocalizationbase onflutter_localizations,Built in Chinese and English [en,zh],Define in assets/langcommon utilsbe located core/utils,Built in common colors,size[Colour,Distance,validators]
1. stacked
- A view file controls UI and a model file controls all data. eg: XX_view.dart && XX_view_model.dart
2. service
-
NavigationService: Router control,router listen
-
DialogService: Dialog
-
BottomSheetService: BottomSheet
-
SnackbarService: Snackbar
-
ConnectivityService :Connect to the service. Whether the application is in the foreground or zoomed to the background. Monitor the application lifecycle. use
connectivity_pluspackage -
OpenLinkService : launching a URL . use
url_launcherpackage -
ShareService : Share . use
sharepackage -
FileService : File upload, download and save service. use
path_providerpackage -
LocalStorageService : Local storage service. use
shared_preferencespackage -
AppSettingsService : AppSetting. use
app_settingspackage -
EnvironmentService : Environment setting. use
flutter_dotenvpackage -
device_info_plus : get device info . use
device_info_pluspackage -
KeyboardService : Keyboard. use
flutter_keyboard_visibilitypackage -
HttpService : Http request. use
diopackage -
StoppableService : Stop called Service
Run in the project root directory:
> flutter packages pub run build_runner build --delete-conflicting-outputs # or > flutter packages pub run build_runner watchRun in the project root directory:
# Generate routing, positioning, and logging models based on core/app/app.dart # The result is located in /core/app/ > flutter pub run build_runner build --delete-conflicting-outputs stacked generate