df_localization library

A package that simplifies adding localization to your Flutter app.

Classes

AsyncPodBuilder<T extends Object>
AuthInterface
AutoTranslationController<TRemoteDatabaseInterface extends DatabaseInterface, TCachedDatabaseInterface extends DatabaseInterface, TTranslationInterface extends TranslatorInterface<Object>>
AutoTranslationScope
BuilderSnapshot
ChildPod<TParent extends Object, TChild extends Object>
ClaudeContent
ClaudeTranslatorBroker
Config<TConfigRef extends ConfigRef>
A configuration class, used to map strings to values.
ConfigFileRef
A reference to a config file.
ConfigManager<TConfig extends Config<ConfigRef>>
ConfigRef<TRef, TType>
A reference to a config element.
DatabaseInterface
DisposablePod<T extends Object>
FileConfig
FileConfigManager
FirebaseAuthBroker
FirestoreDatabseBroker
ForcedAsyncPodListBuilder<T extends Object>
GemeniContent
GeminiTranslatorBroker
GoogleTranslatorBroker
LoginResult
MultiplePodReducer
A final class to handle reducing operations for many Pods.
OnOptionListSnapshot<T extends Object>
OnOptionSnapshot<T extends Object>
OpenAIContent
OpenAITranslatorBroker
PatternSettings
PersistentDatabaseBroker
PodBuilder<T extends Object>
PodBuilderCacheManager
PodBuilderSnapshot<T extends Object>
PodListBuilder<T extends Object>
PodListBuilderSnapshot<T extends Object>
PodNotifier<T extends Object>
An enhanced alternative to ValueNotifier that provides additional lifecycle management capabilities through the ValueListenable.
PodReducer1
A class to handle reducing operations for 1 Pod.
PodReducer2
A class to handle reducing operations for 2 Pods.
PodReducer3
A class to handle reducing operations for 3 Pods.
PodReducer4
A class to handle reducing operations for 4 Pods.
PodReducer5
A class to handle reducing operations for 5 Pods.
PodReducer6
A class to handle reducing operations for 6 Pods.
PodReducer7
A class to handle reducing operations for 7 Pods.
PodResultBuilder<T extends Object>
PodResultBuilderState<T extends Object>
PodResultListBuilder<T extends Object>
PodResultListBuilderState<T extends Object>
PollingPodBuilder<T extends Object>
PrimaryPatternSettings
ProtectedPod<T extends Object>
A RootPod that protects addStrongRefListener and dispose, hiding these methods from external access to prevent misuse or unintended behavior.
ReducerPod<T extends Object>
A Pod that listens to changes to existing Pods returned by the responder. When any of these returned Pods update, it recalculates its value using the reducer function, then calls the responder again to refresh Pods to listen to. This recursive behaviour ensures that the Pod continuously listens to new changes from any updated Pods.
ResolvablePodBuilder<T extends Object>
ResolvablePodListBuilder<T extends Object>
ResolvablePollingPodBuilder<T extends Object>
RootPod<T extends Object>
A Pod that serves as the root of a Pod parent-child chain.
SecondaryPatternSettings
SharedBoolPodCreator
SharedDoublePodCreator
SharedEnumPodCreator
SharedIntPodCreator
SharedJsonPodCreator
SharedPod<A extends Object, B extends Object>
SharedProtectedPod<A extends Object, B extends Object>
A SharedPod that protects addStrongRefListener and dispose, hiding these methods from external access to prevent misuse or unintended behavior.
SharedStringListPodCreator
SharedStringPodCreator
SyncPodBuilder<T extends Object>
SyncPodListBuilder<T extends Object>
TranslatedText
A model class that represents a translated text.
TranslationController
TranslationFileReader
Provides a way to easily read translation files.
TranslationManager
TranslatorInterface<T extends Object>
WeakChangeNotifier
A class that can be extended or mixed in that provides a change notification API using VoidCallback for notifications. It is a modified version of Flutter's ChangeNotifier that uses WeakReference for its listeners.

Enums

ConfigFileType
The supported config file types.

Mixins

GenericPodMixin<T extends Object>
A mixin for managing RootPod and ChildPod.

Functions

convertToFirestoreJson(Map<String, dynamic> localJson) Map<String, dynamic>
convertToFirestoreValue(dynamic value) Map<String, dynamic>
convertToLocalJson(Map<String, dynamic> firestoreJson) Map<String, dynamic>
convertToLocalValue(dynamic value) → dynamic
getNormalizedLanguageTag(Locale locale) String
localeFromString(String? localeString) Locale?

Typedefs

GenericPod<T extends Object> = GenericPodMixin<T>
An alias for GenericPod.
Pod<T extends Object> = RootPod<T>
An alias for Pod.
TFileReaderFunction = Future<String> Function(String filePath)
TGlobalPod<T extends Object> = Resolvable<GenericPod<Option<Result<T>>>>
TNullableReducerFn1<C extends Object, P1 extends Object> = C Function(GenericPod<P1> p1)
TNullableReducerFn2<C extends Object, P1 extends Object, P2 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2)
TOnBeforeDispose<T> = void Function(T value)?
TOnOptionBuilder<T extends Object, TSnapshot extends OnOptionSnapshot<T>> = Widget Function(BuildContext context, TSnapshot snapshot)
TOnOptionListBuilder<T extends Object, TSnapshot extends OnOptionListSnapshot<T>> = Widget Function(BuildContext context, TSnapshot snapshot)
TPodsResponderFn<T extends Object> = Iterable<GenericPod<T>> Function()
TReducerFn1<C extends Object, P1 extends Object> = C Function(GenericPod<P1> p1)
TReducerFn2<C extends Object, P1 extends Object, P2 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2)
TReducerFn3<C extends Object, P1 extends Object, P2 extends Object, P3 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2, GenericPod<P3> p3)
TReducerFn4<C extends Object, P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2, GenericPod<P3> p3, GenericPod<P4> p4)
TReducerFn5<C extends Object, P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object, P5 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2, GenericPod<P3> p3, GenericPod<P4> p4, GenericPod<P5> p5)
TReducerFn6<C extends Object, P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object, P5 extends Object, P6 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2, GenericPod<P3> p3, GenericPod<P4> p4, GenericPod<P5> p5, GenericPod<P6> p6)
TReducerFn7<C extends Object, P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object, P5 extends Object, P6 extends Object, P7 extends Object> = C Function(GenericPod<P1> p1, GenericPod<P2> p2, GenericPod<P3> p3, GenericPod<P4> p4, GenericPod<P5> p5, GenericPod<P6> p6, GenericPod<P7> p7)
TResponderFn1<P1 extends Object> = (GenericPod<P1>) Function()
TResponderFn2<P1 extends Object, P2 extends Object> = (GenericPod<P1>, GenericPod<P2>) Function()
TResponderFn3<P1 extends Object, P2 extends Object, P3 extends Object> = (GenericPod<P1>, GenericPod<P2>, GenericPod<P3>) Function()
TResponderFn4<P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object> = (GenericPod<P1>, GenericPod<P2>, GenericPod<P3>, GenericPod<P4>) Function()
TResponderFn5<P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object, P5 extends Object> = (GenericPod<P1>, GenericPod<P2>, GenericPod<P3>, GenericPod<P4>, GenericPod<P5>) Function()
TResponderFn6<P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object, P5 extends Object, P6 extends Object> = (GenericPod<P1>, GenericPod<P2>, GenericPod<P3>, GenericPod<P4>, GenericPod<P5>, GenericPod<P6>) Function()
TResponderFn7<P1 extends Object, P2 extends Object, P3 extends Object, P4 extends Object, P5 extends Object, P6 extends Object, P7 extends Object> = (GenericPod<P1>, GenericPod<P2>, GenericPod<P3>, GenericPod<P4>, GenericPod<P5>, GenericPod<P6>, GenericPod<P7>) Function()
TSharedBoolPod = SharedPod<bool, bool>
TSharedDoublePod = SharedPod<double, double>
TSharedEnumPod<T extends Enum> = SharedPod<T, String>
TSharedIntPod = SharedPod<int, int>
TSharedJsonPod = SharedPod<Map<String, Object>, String>
TSharedProtectedBoolPod = SharedProtectedPod<bool, bool>
TSharedProtectedDoublePod = SharedProtectedPod<double, double>
TSharedProtectedEnumPod<T extends Enum> = SharedProtectedPod<T, String>
TSharedProtectedIntPod = SharedProtectedPod<int, int>
TSharedProtectedJsonPod = SharedProtectedPod<Map<String, Object>, String>
TSharedProtectedPod = SharedProtectedPod<String, String>
TSharedProtectedStringListPod = SharedProtectedPod<List<String>, List<String>>
TSharedStringListPod = SharedPod<List<String>, List<String>>
TSharedStringPod = SharedPod<String, String>
TTransaltionMap = Map<String, TranslatedText>
TValuesReducerFn<TChild, TParentList> = TChild Function(List<TParentList> parentValues)