flutter_sheet_localization icon indicating copy to clipboard operation
flutter_sheet_localization copied to clipboard

Undefined name 'AppLocalizations'.

Open kayson91 opened this issue 3 years ago • 3 comments

supportedLocales: AppLocalizations.languages.keys.toList()

flutter_sheet_localization 5.1.0

kayson91 avatar May 05 '21 10:05 kayson91

You can use it like supportedLocales: localizedLabels.keys. It returns list of locales. localizedLabels is from generated file.

stepanzalis avatar May 13 '21 20:05 stepanzalis

I got the same problem after upgrading to version 5.1.1 The AppLocalization class is not generated. So I can't use AppLocalizations.of(context). And localizedLabels is just the Map with the labels. I guess the docs are not updated? How do we get the labels with the current locale?

sjoenk avatar Oct 04 '21 18:10 sjoenk

AppLocalizations.of(context)

Hi @stepanzalis , and how to replace AppLocalizations.of(context)?

imagic85 avatar May 01 '23 04:05 imagic85