LocalePlugin constructor
LocalePlugin({
- required List<
LocaleConfiguration> locales, - 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);
}