Now you can use AppLocalizations anywhere in your app:

    
appBar: AppBar(
  // The [AppBar] title text should update its message
  // according to the system locale of the target platform.
  // Switching between English and Spanish locales should
  // cause this text to update.
  title: Text(AppLocalizations.of(context)!.helloWorld),
),


    This code generates a Text widget that displays “Hello World!”
if the target device’s locale is set to English, and “¡Hola Mundo!”
if the target device’s locale is set to Spanish. In the arb files,
the key of each entry is used as the method name of the getter,
while the value of that entry contains the localized message.

To see a sample Flutter app using this tool, please see
gen_l10n_example.

To localize your device app description, you can pass in the localized
string into MaterialApp.onGenerateTitle: