AutoFixer class

Fixes discrepancies between code and JSON translation files.

Constructors

AutoFixer({required String i18nPath, String referenceLocale = 'en', bool dryRun = false, void onLog(String message)?})

Properties

dryRun bool
Whether this is a dry run (no actual changes).
final
hashCode int
The hash code for this object.
no setterinherited
i18nPath String
Path to i18n assets directory.
final
onLog → void Function(String message)?
Callback for logging messages.
final
referenceLocale String
Reference locale to fix.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fix(ComparisonResult comparison, ExtractionResult extracted) Future<FixResult>
Fix missing keys by generating entries in JSON files.
fixAndPrune(ComparisonResult comparison, ExtractionResult extracted, {bool fix = true, bool prune = true}) Future<FixResult>
Fix and prune in a single operation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune(ComparisonResult comparison) Future<FixResult>
Prune orphaned keys from JSON files.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited