Closed erperejildo closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
still having the same problem
@erperejildo - can you reproduce this issue in a sample project? I will take a look.
@erperejildo - can you reproduce this issue in a sample project? I will take a look.
https://zapp.run/edit/flutter-z7ec06l27ed0?entry=lib/main.dart&file=lib/options.dart
@erperejildo - can you reproduce this issue in a sample project? I will take a look.
https://zapp.run/edit/flutter-z7ec06l27ed0?entry=lib/main.dart&file=lib/options.dart
Here is a working example and you can find the fixes below:
https://zapp.run/edit/flutter-zwek06ldwel0?entry=lib/main.dart&file=lib/main.dart
return LocalizationProvider(
state: LocalizationProvider.of(context).state,
child: MaterialApp(
title: 'Flutter App!!',
locale: localizationDelegate.currentLocale,
home: MyHomePage(title: 'Flutter Example App'),
instead of
home: const MyHomePage(title: 'Flutter Example App'),
https://zapp.run/edit/flutter-z7ec06l27ed0?entry=lib/main.dart&file=assets/i18n/en.json:59-105
@erperejildo - can you reproduce this issue in a sample project? I will take a look.
https://zapp.run/edit/flutter-z7ec06l27ed0?entry=lib/main.dart&file=lib/options.dart
Here is a working example and you can find the fixes below:
https://zapp.run/edit/flutter-zwek06ldwel0?entry=lib/main.dart&file=lib/main.dart
- You need to wrap the MaterialApp into a LocalizationProvider:
return LocalizationProvider( state: LocalizationProvider.of(context).state, child: MaterialApp( title: 'Flutter App!!', locale: localizationDelegate.currentLocale,
- MyHomePage should not be a constant
home: MyHomePage(title: 'Flutter Example App'),
instead of
home: const MyHomePage(title: 'Flutter Example App'),
Forgot to wrap it in the example but what I had in my code was the const since it was suggesting me to add it. Thanks, working now
Main page and back icon description (this is automatic so no changes from my side) are still not updated when the rest of the app is. I need to restart the app to see the new language.
Video of the issue: https://www.youtube.com/shorts/fFOS5KXPHo8
Language change function:
More info:
and:
flutter_translate: ^4.0.2