LocalizationCubit constructor
LocalizationCubit({
- required Translations translations,
- required Locale initialLocale,
- required Locale fallbackLocale,
Implementation
LocalizationCubit({
required Translations translations,
required Locale initialLocale,
required this.fallbackLocale,
}) : super(
LocalizationState(
initialLocale,
translations.keys.containsKey(initialLocale.languageCode)
? translations.keys
: {
fallbackLocale.languageCode:
translations.keys[fallbackLocale.languageCode] ?? {}
},
),
);