Common library for the my Flutter projects.
-
First, add dep.
dependencies: fl_lib: git: url: https://github.com/lppcg/fl_lib.git ref: main
-
Set
localizationsDelegates
MaterialApp( localizationsDelegates: const [ LibLocalizations.delegate, ...AppLocalizations.localizationsDelegates, ], supportedLocales: AppLocalizations.supportedLocales, )
-
Update lib l10n
void didChangeDependencies() { super.didChangeDependencies(); context.setLibL10n(); }
-
Init
Paths
void main() async { await Paths.init(); runApp(MyApp()); }
Remember to run ./export_all.dart
after changing any file in this library.