BaseAppLocaleUtils<E extends BaseAppLocale<E, T> , T extends BaseTranslations<E, T> > class
abstract
Provides utility functions without any side effects.
- Available extensions
Constructors
-
BaseAppLocaleUtils.new({required E baseLocale, required List<
E> locales, BuildModelConfig? buildConfig})
Properties
- baseLocale → E
-
Internal: The base locale
final
- buildConfig → BuildModelConfig?
-
Internal: Used for translation overrides
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
locales
→ List<
E> -
Internal: All locales, unordered
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedLocalesRaw
→ List<
String> -
Available on BaseAppLocaleUtils<
Gets supported locales in string format.E, T> , provided by the AppLocaleUtilsExt extensionno setter
Methods
-
buildWithOverrides(
{required E locale, required FileType fileType, required String content, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → T -
Available on BaseAppLocaleUtils<
Creates a translation instance with overrides stored inE, T> , provided by the AppLocaleUtilsExt extensioncontent
. -
buildWithOverridesFromMap(
{required E locale, required bool isFlatMap, required Map map, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → T -
Available on BaseAppLocaleUtils<
Creates a translation instance using the givenE, T> , provided by the AppLocaleUtilsExt extensionmap
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String rawLocale) → E -
Available on BaseAppLocaleUtils<
Parses the raw locale to get the enum. Fallbacks to base locale.E, T> , provided by the AppLocaleUtilsExt extension -
parseAppLocale(
BaseAppLocale< BaseAppLocale, BaseTranslations> locale) → E -
Available on BaseAppLocaleUtils<
Gets theE, T> , provided by the AppLocaleUtilsExt extensionE
type oflocale
. -
parseLocaleParts(
{required String languageCode, String? scriptCode, String? countryCode}) → E -
Available on BaseAppLocaleUtils<
Finds the locale typeE, T> , provided by the AppLocaleUtilsExt extensionE
which fits the locale parts the best. Fallbacks to base locale. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited