AutoTranslationController<TRemoteDatabaseInterface extends DatabaseInterface, TCachedDatabaseInterface extends DatabaseInterface, TTranslationInterface extends TranslatorInterface<Object> > class
Constructors
- AutoTranslationController({bool autoTranslate = kDebugMode, required TRemoteDatabaseInterface? remoteDatabaseBroker, TCachedDatabaseInterface? persistentDatabaseBroker, TTranslationInterface? translationBroker, String cacheKey = 'locale', String translationPath = 'translations', bool versionBySourceText = true})
Properties
- autoTranslate → bool
-
final
- cacheKey → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → Locale?
-
no setter
-
pCache
→ GenericPod<
TTranslationMap> -
no setter
- persistentDatabaseBroker → TCachedDatabaseInterface?
-
final
-
pLocale
→ GenericPod<
Locale> -
no setter
- remoteDatabaseBroker → TRemoteDatabaseInterface?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- translationBroker → TTranslationInterface?
-
final
- translationPath → String
-
final
- versionBySourceText → bool
-
When
true(the default), every stored translation is keyed by its source-text version —<key>@@<hash(source)>— instead of the plain<key>. This is what keeps an already-deployed build reading the exact translation it shipped against: newer builds that edit a string write a new entry under a new hash rather than overwriting the shared one, so changing one string costs one new entry, not a copy of the database.final
Methods
-
init(
) → Future< void> -
migrateToVersionedKeys(
Iterable< Locale> locales) → Future<void> - One-time, idempotent, additive migration of pre-versioning data to source-versioned keys, for every configured database.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setLocale(
Locale? locale) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited