LocalizationAddon constructor

LocalizationAddon({
  1. required List<Locale> locales,
  2. required List<LocalizationsDelegate> localizationsDelegates,
  3. Locale? initialLocale,
})

Implementation

LocalizationAddon({
  required this.locales,
  required this.localizationsDelegates,
  this.initialLocale,
})  : assert(
        locales.isNotEmpty,
        'locales cannot be empty',
      ),
      assert(
        initialLocale == null || locales.contains(initialLocale),
        'initialLocale must be in locales',
      ),
      super(
        name: 'Locale',
      );