NodeInterface<R> class abstract

You can use this class to add loading and error states to your nodes

Signal<bool> isLoading

NullableSignal<Object> error

//A separate signal for full screen loading
Signal<bool> fullScreenLoading

//You can use the `loading` method to wrap any async operation
//so you don't have to handle the loading state yourself
Future<T> loading<T>(
   Future<T> future, {
   bool invokeLoading = true,
   //If you want to show a full screen loading, just set this to true
   bool fullScreen = false,
 })
Inheritance

Constructors

NodeInterface({ValueKey? key})

Properties

computedSignals → List<BaseComputed>
All computed signals.
no setterinherited
error → NullableSignal<Object>
latefinal
fullScreenLoading → BoolSignal
latefinal
hashCode → int
The hash code for this object.
no setterinherited
initialized → bool
no setterinherited
isClosed → bool
no setterinherited
isLoading → BoolSignal
latefinal
key → ValueKey?
finalinherited
readable → dynamic
This is the readable version of the node It is used to access the signals of the node directly by its value.
no setterinherited
runtimeKey → Key
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signals → List<BaseSignal>
All non-computed signals.
no setterinherited

Methods

addSignalListener(void listener(BaseSignal signal)) → void
inherited
attach(InheritedTrinityScope scope) → bool
Returns true if the node was previously initialized, false otherwise
inherited
clearError() → void
findNode<N extends NodeInterface>({Key? key}) → N
inherited
findNodeOrNull<N extends NodeInterface>({Key? key}) → N?
inherited
isSignalRegistered(BaseSignal signal) → bool
We use this to improve optimization
inherited
loading<T>(Future<T> future(), {bool invokeLoading = true, bool fullScreen = false}) → Future<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose() → void
When the NodeProvider is disposed
inherited
onInit() → void
First point of entry for the node, the scope is already available
inherited
onReady() → void
After the first frame, the UI context is ready
inherited
registerSignal<S extends BaseSignal>(S signal) → S
inherited
removeSignalListener(void listener(BaseSignal signal)) → void
inherited
toString() → String
A string representation of this object.
inherited
when<W extends Widget>({required W loading(), required W error(Object), required W orElse()}) → Widget

Operators

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

Static Methods

of<N extends NodeInterface>(BuildContext context, {Key? key}) → N