Skip to content

Instantly share code, notes, and snippets.

@amendezcabrera
Last active September 2, 2022 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amendezcabrera/12b3b13564d5cecc1ddb599ad9864013 to your computer and use it in GitHub Desktop.
Save amendezcabrera/12b3b13564d5cecc1ddb599ad9864013 to your computer and use it in GitHub Desktop.
Setting default locale in Flutter
// Dependencies: [flutter_localizations](https://docs.flutter.dev/development/accessibility-and-localization/internationalization) (Official)
MaterialApp(
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
title: ref.watch(currentStallProvider)?.place?.name ?? '',
theme: MainTheme.theme,
home: MyHomePage(
title: ref.watch(currentStallProvider)?.place?.name ?? ''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment