flutter localization without MaterialApp

Viewed 112

I am using flutter_localizations plugin. The root view is a MaterialApp widget and I can easily call AppLocalizations.of(context).text_id to get the localized string. The problem is I have some child views that my app navigates to that are not based on MaterialApp and calling AppLocalizations.of(context).text_id there does not work. Is there a way to still use localization in views that do not have MaterialApp as parent?

0 Answers
Related