LocalizationCubit constructor

LocalizationCubit({
  1. required Translations translations,
  2. required Locale initialLocale,
  3. 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] ?? {}
                },
        ),
      );