RxModel<T> class
- Inheritance
-
- Object
- RxInterface<
T> - RxNotifier<
T> - Rx<
T> - RxQueryModel<
void, T> - RxModel
- Available extensions
Constructors
Properties
- canUpdate → bool
-
no setterinherited
- firstRebuild ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAutoStart ↔ bool
-
getter/setter pairinherited
- query ↔ void
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentToStream ↔ bool
-
getter/setter pairinherited
-
source
↔ Future<
T> Function(void query) -
getter/setter pairinherited
-
stream
→ Stream<
T> -
no setterinherited
- string → String
-
Same as
toString()but using a getter.no setterinherited -
subject
↔ GetStream<
T> -
getter/setter pairinherited
- value ↔ T
-
Returns the current
valuegetter/setter pairinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
inherited
-
addListener(
GetStream< T> rxGetx) → void -
This is an internal method.
Subscribe to changes on the inner stream.
inherited
-
bindStream(
Stream< T> stream) → void -
Binds an existing
Stream<T>to thisRx<T>to keep the values in sync. You can bind multiple sources to update the value. Closing the subscription will happen automatically when the observer Widget (GetXorObx) gets unmounted from the Widget tree.inherited -
call(
[T? v]) → T -
updates the value to
nulland adds it to the Stream. Even with null-safety coming, is still an important feature to support, ascall()doesn't acceptnullvalues. For instance,InputDecoration.errorTexthas to be null to not show the "error state".inherited -
close(
) → void -
Closes the subscriptions for this Rx, releasing the resources.
inherited
-
initialValueStream(
) → Stream< T> -
Available on Rx<
T> , provided by the GetReactiveExtension extension -
initialValueStreamMap<
E> (E mapper(T item)) → Stream< E> -
Available on Rx<
T> , provided by the GetReactiveExtension extension -
listen(
void onData(T), {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< T> -
inherited
-
listenAndPump(
void onData(T event), {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< T> -
Returns a StreamSubscription similar to
listen, but with the added benefit that it primes the stream with the currentvalue, rather than waiting for the nextvalue. This should not be called inonInitor anywhere else during the build process.inherited -
listenWithInitialValue(
void onData(T data)) → StreamSubscription< T> -
Available on Rx<
T> , provided by the GetReactiveExtension extension -
map<
R> (R mapper(T? data)) → Stream< R> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → void -
Makes a direct update of
valueadding it to the Stream useful when you make use of Rx for custom Types to referesh your UI.inherited -
reloadDataSource(
{void updatedQuery}) → Future -
inherited
-
toJson(
) → dynamic -
Returns the json representation of
value.inherited -
toMappedWidget<
E> (E? mapper(T model), Widget builder(E? item)) → StreamBuilder< E?> -
Available on Rx<
T> , provided by the GetExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
toWidget(
Widget builder(Rx< T> rx)) → ObxValue<Rx< T> > -
Available on Rx<
T> , provided by the GetExtension extension -
trigger(
T v) → void -
Following certain practices on Rx data, we might want to react to certain
listeners when a value has been provided, even if the value is the same.
At the moment, we ignore part of the process if we
.call(value)with the same value since it holds the value and there's no real need triggering the entire process for the same value inside, but there are other situations where we might be interested in triggering this.inherited -
update(
void fn(T? val)) → void -
Uses a callback to update
valueinternally, similar torefresh, but provides the current value as the argument. Makes sense for custom Rx types (like Models).inherited
Operators
-
operator ==(
Object o) → bool -
This equality override works for _RxImpl instances and the internal
values.
inherited