For routing you can use RouteManager
Class
RouteManager initted inside the SplashView
- Routemanager.newPage(Widget())
- RouteManager.newPageReplacement(Widget())
- RouteManager.backPage()
For local storage you can use Storage
Class
- saveString(String)
- getString(String)
- saveList(String)
- getList(String)
- deleteStorage(String)
If you need to use created hook inside the StatelessWidget just use StatefulWrapper
Widget build(BuildContext context) {
return StatefulWrapper(
onInit: () {
RouteManager.initializeRoute(context);
WidgetsBinding.instance?.addPostFrameCallback((_) {
//TODO: Redirect
});
},
child: Scaffold(
appBar: AppBar(
title: Text('${AppLocalizations.of(context).helloWorld}'),
),
));
}
- You can find some ready
String
,Context
andDateTime
extensions
- You can add helper functions inside the
Utils
Class
- Add your Todo's here
- Manage your theme settings.
- For localization you can use
.arb
files. - Create .arb files inside the
lib/I10n
- And run this command for generate language files
flutter gen-l10n