LocalePlugin constructor

LocalePlugin({
  1. required List<LocaleConfiguration> locales,
  2. LocaleConfiguration? defaultLocale,
})

Implementation

LocalePlugin({
  required this.locales,
  LocaleConfiguration? defaultLocale,
})  : assert(locales.isNotEmpty, 'At least one locale must be provided'),
      _defaultLocale = defaultLocale,
      super(name: 'locale', title: 'Internationalization') {
  currentLocale = Observable((_defaultLocale ?? locales.first).locale);
}