DialectConfig class
Typed view of dialect.yaml. M4 reads source_locale /
target_locales; M5 adds platforms. The length_ratio block and
the project block lands when M8 needs them — for now they're
preserved verbatim in extras.
Constructors
-
DialectConfig({required String sourceLocale, required List<
String> targetLocales, Map<String, PlatformConfig> platforms = const {}, Map<String, Object?> extras = const {}})
Properties
-
extras
→ Map<
String, Object?> -
Other top-level keys from
dialect.yaml, preserved verbatim.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
platforms
→ Map<
String, PlatformConfig> -
Per-platform output config keyed by platform name (
flutter,ios,android,backend). v1.0 ships only thearbformat adapter (M5dialect sync); other formats are stored verbatim here for M11 / v1.1 to consume.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceLocale → String
-
Source language tag (e.g.
en).final -
targetLocales
→ List<
String> -
Translation targets (e.g.
[es, ja, ar]). Empty afterdialect init— the user fills this in before their firstdialect check.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
parse(
String content) → DialectConfig -
Parse a YAML string. Throws FormatException on missing
source_locale, malformedtarget_locales, or non-map root.