SafeFuturePod<T> class
base
A Pod that is initially None then sets its value when a FutureOr
completes as Ok or fails as Err.
- Inheritance
-
- Mixed-in types
-
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hasListeners
→ bool
-
no setterinherited
-
isDisposed
→ bool
-
Whether this Pod has been disposed of or not.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
toDisposeResources
→ Set<_ToDisposeResource>
-
The list of resources marked for dispose via
willDispose
.
no setterinherited
-
value
→ Option<Result<T, Object>>
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
no setterinherited
Methods
-
addListener(VoidCallback listener)
→ void
-
❌ Do not use this method directly. Use addStrongRefListener instead.
inherited
-
addSingleExecutionListener(VoidCallback listener)
→ void
-
Registers a listener that will be called only once when the object
notifies its listeners. After the listener is called, it is automatically
removed.
inherited
-
addStrongRefListener({required VoidCallback strongRefListener})
→ void
-
Register a closure to be called when the object notifies its listeners.
inherited
-
cond(bool test(Option<Result<T, Object>> value))
→ FutureOr<Option<Result<T, Object>>>
-
Returns the value of the Pod when the
test
returns true
.
inherited
-
dispose()
→ void
-
Disposes all children before disposing
this
.
inherited
-
disposeChildren()
→ void
-
Disposes and removes all children.
inherited
-
map<B>(B reducer(Option<Result<T, Object>>? value))
→ ChildPod<Option<Result<T, Object>>, B>
-
Maps
this
GenericPod to a new ChildPod using the specified reducer
.
inherited
-
nonNull<T1 extends T>()
→ FutureOr<T1>
-
Returns the value of the Pod when it is not
null
.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners()
→ void
-
inherited
-
reduce<C, O>(GenericPod<O> other, TReducerFn2<C, Option<Result<T, Object>>, O> reducer)
→ ChildPod<dynamic, C>
-
Reduces the current Pod and
other
into a single ChildPod.
inherited
-
removeListener(VoidCallback listener)
→ void
-
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
unwrap()
→ T
-
Unwraps the Pod's value.
-
willDispose<T>(T resource, {_OnBeforeCallback<T>? onBeforeDispose})
→ T
-
Marks the
resource
for dispose.
inherited