RM class abstract

Constructors

RM()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

context BuildContext?
Get an active BuildContext.
no setter
env ↔ dynamic
Static variable the holds the chosen working environment or flavor.
getter/setter pair
no setter
no setter
scaffoldMessenger ScaffoldMessengerState?
no setter

Static Methods

deleteAllPersistState() Future<void>
Clear the local persist store
disposeAll() → void
Dispose all Injected State
get<T>([String? name]) ReactiveModel<T>
inject<T>(T creator(), {T? initialState, StateInterceptor<T>? stateInterceptor, SideEffects<T>? sideEffects, DependsOn<T>? dependsOn, int undoStackLength = 0, PersistState<T> persist()?, bool autoDisposeWhenNotUsed = true, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?}) Injected<T>
Injection of a primitive, enum, or object.
injectAnimation({required Duration duration, Duration? reverseDuration, Curve curve = Curves.linear, Curve? reverseCurve, double? initialValue, double lowerBound = 0.0, double upperBound = 1.0, AnimationBehavior animationBehavior = AnimationBehavior.normal, int? repeats, bool shouldReverseRepeats = false, bool shouldAutoStart = false, void onInitialized(InjectedAnimation)?, void endAnimationListener()?}) InjectedAnimation
Inject an animation. It works for both implicit and explicit animation.
injectAuth<T, P>(IAuth<T, P> repository(), {T? unsignedUser, P param()?, Duration autoRefreshTokenOrSignOut(T user)?, FutureOr<Stream<T>> onAuthStream(IAuth<T, P> repo)?, PersistState<T> persist()?, void onSigned(T s)?, void onUnsigned()?, SnapState<T>? stateInterceptor(SnapState<T> currentSnap, SnapState<T> nextSnap)?, SideEffects<T>? sideEffects, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?}) InjectedAuth<T, P>
Injection of a state that can authenticate and authorize a user.
injectCRUD<T, P>(ICRUD<T, P> repository(), {P param()?, bool readOnInitialization = false, OnCRUDSideEffects? onCRUDSideEffects, SideEffects<List<T>>? sideEffects, PersistState<List<T>> persist()?, SnapState<List<T>>? stateInterceptor(SnapState<List<T>> currentSnap, SnapState<List<T>> nextSnap)?, int undoStackLength = 0, DependsOn<List<T>>? dependsOn, bool autoDisposeWhenNotUsed = true, bool isLazy = true, String? debugPrintWhenNotifiedPreMessage, String toDebugString(List<T>?)?}) InjectedCRUD<T, P>
Injection of a state that can create, read, update and delete from a backend or database service.
injectFlavor<T>(Map<dynamic, FutureOr<T> Function()> impl, {T? initialState, void onInitialized(T? s)?, SideEffects<T>? sideEffects, StateInterceptor<T>? stateInterceptor, DependsOn<T>? dependsOn, int undoStackLength = 0, PersistState<T> persist()?, bool autoDisposeWhenNotUsed = true, bool isLazy = true, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?}) Injected<T>
Functional injection of flavors (environments).
injectForm({AutovalidateMode autovalidateMode = AutovalidateMode.disabled, bool autoFocusOnFirstError = true, void onSubmitting()?, void onSubmitted()?, SideEffects? submissionSideEffects, Future<void> submit()?, bool? isEnabled, bool? isReadOnly}) InjectedForm
Inject a form that controls all TextField and OnFormFieldBuilder instantiated inside its builder method.
injectFormField<T>(T initialValue, {List<String? Function(T value)>? validators, bool? validateOnValueChange, bool? validateOnLoseFocus, void onValueChange(InjectedFormField formField)?, bool autoDispose = true, bool? isReadOnly, bool? isEnabled}) InjectedFormField<T>
Inject form inputs other than for text editing
injectFuture<T>(Future<T> creator(), {T? initialState, StateInterceptor<T>? stateInterceptor, SideEffects<T>? sideEffects, DependsOn<T>? dependsOn, int undoStackLength = 0, PersistState<T> persist()?, bool autoDisposeWhenNotUsed = true, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?}) Injected<T>
injection of a Future.
injectI18N<T>(Map<Locale, FutureOr<T> Function()> i18Ns, {String? persistKey, SnapState<T>? stateInterceptor(SnapState<T> currentSnap, SnapState<T> nextSnap)?, SideEffects<T>? sideEffects, DependsOn<T>? dependsOn, int undoStackLength = 0, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?}) InjectedI18N<T>
Injection of a state that handle app internationalization and localization.
injectScrolling({double initialScrollOffset = 0.0, bool keepScrollOffset = true, void onScrolling(InjectedScrolling)?, int endScrollDelay = 300}) InjectedScrolling
Inject a ScrollController
injectStream<T>(Stream<T> creator(), {T? initialState, StateInterceptor<T>? stateInterceptor, void onInitialized(T? s, StreamSubscription subscription)?, SideEffects<T>? sideEffects, DependsOn<T>? dependsOn, PersistState<T> persist()?, int undoStackLength = 0, bool autoDisposeWhenNotUsed = true, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?, Object? watch(T? s)?}) Injected<T>
injection of a Stream.
injectTabPageView({required int length, int initialIndex = 0, Duration duration = kTabScrollDuration, Curve curve = Curves.ease, bool keepPage = true, double viewportFraction = 1.0}) InjectedTabPageView
Inject a TabController and PageController and sync them to work together to get the most benefit of them.
injectTextEditing({String text = '', TextSelection selection = const TextSelection.collapsed(offset: -1), TextRange composing = TextRange.empty, List<String? Function(String? text)>? validators, bool? validateOnTyping, bool? validateOnLoseFocus, void onTextEditing(InjectedTextEditing textEditing)?, bool? isReadOnly, bool? isEnabled, bool autoDispose = true}) InjectedTextEditing
Inject a TextEditingController
injectTheme<T>({required Map<T, ThemeData> lightThemes, Map<T, ThemeData>? darkThemes, ThemeMode themeMode = ThemeMode.system, String? persistKey, SnapState<T>? stateInterceptor(SnapState<T> currentSnap, SnapState<T> nextSnap)?, SideEffects<T>? sideEffects, int undoStackLength = 0, DependsOn<T>? dependsOn, bool autoDisposeWhenNotUsed = true, bool isLazy = true, String? debugPrintWhenNotifiedPreMessage, Object? toDebugString(T?)?}) InjectedTheme<T>
Injection of a state that handle app theme switching.
storageInitializer(IPersistStore store) Future<void>
Initialize the default persistence provider to be used.
storageInitializerMock() Future<_PersistStoreMock>
Initialize a mock persistence provider.