title: How can I display different languages in a custom bottom bar and Drop List in Flutter?
body: <p>I'm using ARB files along with code generation for my internalization solution for my flutter app. Everything seems to be work as expecting, but I do have one problem. I can't get the options in the drop down lists and my bottom bar to switch languages.</p>
  
  <p>Here is my locale.dart file</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:intl/intl.dart';
  import 'dart:async';
  
  import 'package:manchester_maps/l10n/messages_all.dart';
  
  class AppLocalizations {
    static Future&lt;AppLocalizations&gt; load(Locale locale) {
      final String name =
          locale.countryCode.isEmpty ? locale.languageCode : locale.toString();
  
      final String localeName = Intl.canonicalizedLocale(name);
  
      return initializeMessages(localeName).then((bool _) {
        Intl.defaultLocale = localeName;
        return AppLocalizations();
      });
    }
  
    static AppLocalizations of(BuildContext context) {
      return Localizations.of&lt;AppLocalizations&gt;(context, AppLocalizations);
    }
  
    String get title {
      return Intl.message(
        'Manchester Maps',
        name: 'title',
        desc: 'The name of the application',
      );
    }
  
    String get pageTitleMyPlaces {
      return Intl.message('My Places',
          name: 'pageTitleMyPlaces', desc: 'The My Places Title');
    }
  
    String get pageTitleSafetyInfo {
      return Intl.message('Safety Info',
          name: 'pageTitleSafetyInfo', desc: 'The Safety Info Title');
    }
  
    String get pageTitleSettings {
      return Intl.message('Settings',
          name: 'pageTitleSettings', desc: 'The Safety Info Title');
    }
  
    String get drawerResidences {
      return Intl.message('Residences',
          name: 'drawerResidences',
          desc: 'The Residences option on the sliding nav bar');
    }
    ...
    ...
    ...
  
  
  class AppLocalizationsDelegate extends LocalizationsDelegate&lt;AppLocalizations&gt; {
    const AppLocalizationsDelegate();
  
    @override
    bool isSupported(Locale locale) {
      return ['en', 'es', 'fr', 'hi', 'ar', 'ru', 'zh', 'ja']
          .contains(locale.languageCode);
    }
  
    @override
    Future&lt;AppLocalizations&gt; load(Locale locale) {
      return AppLocalizations.load(locale);
    }
  
    @override
    bool shouldReload(AppLocalizationsDelegate old) {
      return false;
    }
  }
  </code></pre>
  
  <p>I have a number of Lists (see below) and this is where I am having issues. </p>
  
  <p>In the code below, I have an error with the context. </p>
  
  <pre><code>    class _SettingsFormState extends State&lt;SettingsForm&gt; {
    // TODO: Change this to retrieve data from local database
    bool _allowTilt = true;
    bool _enableRotate = true;
    bool _enableZoom = true;
    bool _showTraffic = false;
    bool _showCompass = true;
  
    // Properties for Theme Timing. This denotes whether the theme switches
    //  from day to night automatically at sunset and sunrise times
    List&lt;String&gt; _themeTiming = [**AppLocalizations.of(context).settingsDDLThemeDay**, 'Night', 'Auto'];
    String _selectedThemeTiming;
    // List of Day Themes
    List&lt;String&gt; _dayTheme = [
      'Standard',
      'Retro',
      'Simple Bright',
      'Map Posters',
      'Bentley',
      'Clean Cut'
    ];
    String _selectedDayTheme;
    // List of Night Themea
    List&lt;String&gt; _nightTheme = [
      'Night',
      'Simple Night',
      'Dark',
      'Midnight Commander',
      'Aubergine',
      'Cobalt'
    ];
    String _selectedNightTheme;
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: Scaffold(
          body: Container(
            decoration: BoxDecoration(
              gradient: LinearGradient(
              ...
              ...
              ...
  </code></pre>
  
  <p>Any help with this is appreciated as it is driving me nuts.</p>
  
  <p><a href="https://i.stack.imgur.com/F9jlX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F9jlX.png" alt="Screenshot"></a></p>