MigrationConfig class

Configuration for the migration process

Constructors

MigrationConfig({String keyStrategy = 'msgid', Map<String, String> featureMappings = const {}, List<String> excludePatterns = const [], int autoExtractThreshold = 80, String sourceLocale = 'en', List<String> targetLocales = const [], bool preserveFormatting = true, bool stableIdsForVolatile = false})
const
MigrationConfig.createDefault()
Create a default configuration
factory

Properties

autoExtractThreshold int
Confidence threshold for automatic extraction (0-100) Strings with confidence below this will prompt for user review
final
excludePatterns List<String>
Patterns to exclude from migration
final
featureMappings Map<String, String>
Mapping of source directories to JSON feature files Example: {'lib/pages/auth/': 'auth.json', 'lib/pages/profile/': 'profile.json'}
final
hashCode int
The hash code for this object.
no setterinherited
keyStrategy String
Key generation strategy: 'msgid' (use natural language as keys) or 'stable_id' (use semantic IDs like 'auth.sign_in')
final
preserveFormatting bool
Whether to preserve original string formatting
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceLocale String
Source locale (typically 'en' for English)
final
stableIdsForVolatile bool
Whether to generate stable IDs for volatile copy
final
targetLocales List<String>
Target locales to set up (empty = English only)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(String path) Future<void>
Save configuration to a YAML file
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

load(String path) Future<MigrationConfig>
Load configuration from a YAML file