LocalePlugin constructor

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

Implementation

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