ControllerRx<T> class
Special SwiftValue type for controllers that automatically becomes read-only from views
- Inheritance
-
- Object
- ChangeNotifier
- SwiftValue<
T> - ControllerRx
- Available extensions
Constructors
- ControllerRx(T value, SwiftController _controller, {String? name})
Properties
- 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
- value ↔ T
-
Getter - works everywhere (read access is always allowed)
getter/setter pairoverride
Methods
-
add(
double value) → void -
Available on Rx<
Adds a value to the reactive double and updates it.double> , provided by the RxDoubleExtensions extension -
add(
int value) → void -
Available on Rx<
Adds a value to the reactive integer and updates it.int> , provided by the RxIntExtensions extension -
add(
String value) → void -
Available on Rx<
Adds (concatenates) a string to the reactive string and updates it.String> , provided by the RxStringExtensions extension -
addGST(
double percent) → void -
Available on Rx<
Adds GST to the reactive double.double> , provided by the RxDoubleExtensions extension -
addGST(
double percent) → void -
Available on Rx<
Adds GST to the reactive integer.int> , provided by the RxIntExtensions extension -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
applyPercent(
double percent) → void -
Available on Rx<
Applies a percentage to the reactive double (adds percentage).double> , provided by the RxDoubleExtensions extension -
applyPercent(
double percent) → void -
Available on Rx<
Applies a percentage to the reactive integer (adds percentage).int> , provided by the RxIntExtensions extension -
assertType(
[String? message]) → Rx< T> -
Available on Rx<
Assert type at runtimeT> , provided by the RxTypeSafety extension -
chain(
) → ReactiveChain< T> -
Available on Rx<
Create a reactive chainT> , provided by the RxTypeSafety extension -
discount(
double percent) → void -
Available on Rx<
Applies a discount percentage to the reactive double (subtracts percentage).double> , provided by the RxDoubleExtensions extension -
discount(
double percent) → void -
Available on Rx<
Applies a discount percentage to the reactive integer (subtracts percentage).int> , provided by the RxIntExtensions extension -
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<
Multiplies the reactive double by a value and updates it.double> , provided by the RxDoubleExtensions extension -
mul(
int value) → void -
Available on Rx<
Multiplies the reactive integer by a value and updates it.int> , provided by the RxIntExtensions extension -
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<
Removes GST from the reactive double.double> , provided by the RxDoubleExtensions extension -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
roundTo(
int decimals) → void -
Available on Rx<
Rounds the reactive double to a specified number of decimal places.double> , provided by the RxDoubleExtensions extension -
sub(
double value) → void -
Available on Rx<
Subtracts a value from the reactive double and updates it.double> , provided by the RxDoubleExtensions extension -
sub(
int value) → void -
Available on Rx<
Subtracts a value from the reactive integer and updates it.int> , provided by the RxIntExtensions extension -
tax(
double percent) → void -
Available on Rx<
Applies a tax percentage to the reactive double (adds percentage).double> , provided by the RxDoubleExtensions extension -
tax(
double percent) → void -
Available on Rx<
Applies a tax percentage to the reactive integer (adds percentage).int> , provided by the RxIntExtensions extension -
toggle(
) → void -
Available on Rx<
Toggles the reactive boolean value.bool> , provided by the RxBoolExtensions extension -
toString(
) → String -
A string representation of this object.
inherited
-
toTyped(
) → TypedRx< T> -
Available on Rx<
Create a typed versionT> , provided by the RxTypeSafety extension -
update(
T newValue) → void -
Updates the value and notifies listeners if changed
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited