How do I programatically change Locale in Flutter when using MaterialApp.router()
I have: final themeMode = context.select<PreferencesChangeNotifier, ThemeMode>((notifier) => notifier.themeMode); final locale = context.select<LocaleChangeNotifier, Locale>((notifier) => notifier.locale); return MaterialApp.router( locale: locale, debugShowCheckedModeBanner: false, scaffoldMessengerKey: MyApp.rootScaffoldMessengerKey, localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, routeInformationParser: _routeInformationParser, routerDelegate: _routerDelegate, title: 'MyApp', theme: AppTheme.instance.lightTheme, darkTheme: AppTheme.instance.darkTheme, themeMode: themeMode,…