PlayxLocaleConfig constructor

PlayxLocaleConfig({
  1. required List<XLocale> supportedLocales,
  2. XLocale? startLocale,
  3. XLocale? fallbackLocale,
  4. bool useOnlyLangCode = false,
  5. bool useFallbackTranslations = true,
  6. String path = 'assets/translations',
  7. AssetLoader assetLoader = const RootBundleAssetLoader(),
  8. bool saveLocale = true,
})

Implementation

PlayxLocaleConfig({
  required this.supportedLocales,
  this.startLocale,
  this.fallbackLocale,
  this.useOnlyLangCode = false,
  this.useFallbackTranslations = true,
  this.path = 'assets/translations',
  this.assetLoader = const RootBundleAssetLoader(),
  this.saveLocale = true,
})  : assert(path.isNotEmpty, 'path can not be empty'),
      assert(
          supportedLocales.isNotEmpty, 'supportedLocales can not be empty');