ArbFile class

Constructors

ArbFile({required String locale, required List<ArbEntry> entries, Map<String, Object?> fileMetadata = const {}, Map<String, ArbMetadata> orphanMetadata = const {}, Map<String, int> entryLines = const {}, String? sourcePath})

Properties

entries → List<ArbEntry>
Translation entries, in the order they appear after parsing. dialect check --fix re-sorts these on write.
final
entryLines → Map<String, int>
1-based line numbers for each top-level key in the original source text. Populated by the parser via a post-decode scan; used by the dialect check report formatter to produce file:line hints. jsonDecode strips positions, so we re-derive them.
final
fileMetadata → Map<String, Object?>
Other @@<name> file-level metadata, preserved verbatim so we never silently strip fields Dialect doesn't know about (e.g. Flutter gen_l10n's @@last_modified, custom @@x-context). Keyed by the @@-prefixed name, value is the JSON-decoded payload.
final
hashCode → int
The hash code for this object.
no setterinherited
locale → String
IETF BCP 47 locale tag, e.g. en, es, pt-BR.
final
orphanMetadata → Map<String, ArbMetadata>
@key metadata blocks whose corresponding key/value pair is missing. Preserved here (rather than silently dropped) so dialect check can flag them as a structural error. dialect check --fix strips them from the written output by construction — the writer never emits orphanMetadata.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourcePath → String?
Path to the source file this ARB was parsed from, if known. Set by the project loader. Used by report formatting; null when the ARB came from an in-memory string (e.g. unit tests).
final

Methods

entryFor(String key) → ArbEntry?
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