ReduxStore<T> class

Store with Redux-like reducer pattern

Inheritance
Available extensions

Constructors

ReduxStore(T initialState, Reducer<T> _reducer, {String? name})

Properties

actionHistory List<Action>
Get action history
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
rawValue → T
Gets the value without registering as dependency (for internal use)
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → T
Get current state (alias for value)
no setter
value ↔ T
Gets the current value and registers this SwiftValue as a dependency
getter/setter pairinherited

Methods

add(int value) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Adds a value to the reactive integer and updates it.
add(String value) → void

Available on Rx<String>, provided by the RxStringExtensions extension

Adds (concatenates) a string to the reactive string and updates it.
add(double value) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Adds a value to the reactive double and updates it.
addGST(double percent) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Adds GST to the reactive integer.
addGST(double percent) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Adds GST to the reactive double.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
applyPercent(double percent) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Applies a percentage to the reactive double (adds percentage).
applyPercent(double percent) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Applies a percentage to the reactive integer (adds percentage).
assertType([String? message]) Rx<T>

Available on Rx<T>, provided by the RxTypeSafety extension

Assert type at runtime
chain() ReactiveChain<T>

Available on Rx<T>, provided by the RxTypeSafety extension

Create a reactive chain
clearHistory() → void
Clear action history
discount(double percent) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Applies a discount percentage to the reactive integer (subtracts percentage).
discount(double percent) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Applies a discount percentage to the reactive double (subtracts percentage).
dispatch(Action action) → void
Dispatch an action to update state
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
mul(double value) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Multiplies the reactive double by a value and updates it.
mul(int value) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Multiplies the reactive integer by a value and updates it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
notifyListenersTransaction() → void

Available on ChangeNotifier, provided by the TransactionNotifier extension

Notifies listeners, respecting transaction context.
removeGST(double percent) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Removes GST from the reactive double.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset(T initialState) → void
Reset to initial state
roundTo(int decimals) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Rounds the reactive double to a specified number of decimal places.
setHistoryEnabled(bool enabled) → void
Enable/disable action history
setHistoryLimit(int limit) → void
Set history limit
sub(double value) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Subtracts a value from the reactive double and updates it.
sub(int value) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Subtracts a value from the reactive integer and updates it.
tax(double percent) → void

Available on Rx<double>, provided by the RxDoubleExtensions extension

Applies a tax percentage to the reactive double (adds percentage).
tax(double percent) → void

Available on Rx<int>, provided by the RxIntExtensions extension

Applies a tax percentage to the reactive integer (adds percentage).
toggle() → void

Available on Rx<bool>, provided by the RxBoolExtensions extension

Toggles the reactive boolean value.
toString() String
A string representation of this object.
inherited
toTyped() TypedRx<T>

Available on Rx<T>, provided by the RxTypeSafety extension

Create a typed version
update(T newValue) → void
Updates the value and notifies listeners if changed
inherited

Operators

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