Flutter Default Localizations isn't work when I use GetX Statemanagement. It show me a error like
Undefined name 'AppLocalizations'.
Try correcting the name to one that is defined, or defining the name.
How Can I fixed this ?
Flutter Default Localizations isn't work when I use GetX Statemanagement. It show me a error like
Undefined name 'AppLocalizations'.
Try correcting the name to one that is defined, or defining the name.
How Can I fixed this ?
Please add these dependencies on pubspec.yaml
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.17.0
More information here
for me the problem solved by
This creates a pubspec.yml file with the following entries:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: any
then pub get
I had this problem in a Flutter widget test code. The solution illustrated by the images below is applicable to the Flutter app code as well. Note that my Flutter app is conform to the MVVM architecture using Provider, the reason why MultiProvider is used. The code of the project is available on GitHub My AudioLearn prototype project. Note that the real project will be referenced in the readme file and will available as well since earning money is not what motivates me to develop this application.
© 2022 - 2024 — McMap. All rights reserved.