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({Key? key})

Properties

error NullableSignal<Object>
latefinal
fullScreenLoading Signal<bool>
latefinal
hashCode int
The hash code for this object.
no setterinherited
initialized bool
no setterinherited
isLoading Signal<bool>
latefinal
key Key?
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

Methods

attach(InheritedTrinityScope scope) bool
Returns true if the node was previously initialized, false otherwise
inherited
clearError() → void
dispose() → void
Método interno llamado por el framework para limpiar recursos
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
Cuando el NodeProvider se desmonta
inherited
onInit() → void
Primer punto de entrada, el scope ya está disponible
inherited
onReady() → void
Después del primer frame, contexto de UI listo
inherited
registerManyBridges(List<BaseBridgeSignal> bridges) → void
inherited
registerSignal<S extends BaseSignal>(S signal) → S
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) → N