ToastUtils class
Methods
-
awaitBeforeDispose<T>(Future<T> future)
→ Future<T>
-
Add
future
to a list of futures that will be awaited before the
object is disposed.
inherited
-
clear()
→ void
-
override
-
dispose()
→ Future<Null>
-
Dispose of the object, cleaning up to prevent memory leaks.
inherited
-
flagLeak([String? description])
→ void
-
Flag the object as having been disposed in a way that allows easier
profiling.
inherited
-
getManagedDelayedFuture<T>(Duration duration, T callback())
→ Future<T>
-
Creates a Future that will complete, with the value
returned by
callback
, after the given amount of time has elapsed.
inherited
-
getManagedDisposer(Disposer disposer)
→ ManagedDisposer
-
Automatically handle arbitrary disposals using a callback.
inherited
-
getManagedPeriodicTimer(Duration duration, void callback(Timer timer))
→ Timer
-
Creates a periodic Timer that will be cancelled if active
upon disposal.
inherited
-
getManagedTimer(Duration duration, void callback())
→ Timer
-
Creates a Timer instance that will be cancelled if active
upon disposal.
inherited
-
listenToStream<T>(Stream<T> stream, void onData(T event), {Function? onError, void onDone()?, bool? cancelOnError})
→ StreamSubscription<T>
-
Returns a StreamSubscription which handles events from the stream using
the provided
onData
, onError
and onDone
handlers.
inherited
-
manageAndReturnTypedDisposable<T extends Disposable>(T disposable)
→ T
-
Automatically dispose another object when this object is disposed.
inherited
-
manageCompleter<T>(Completer<T> completer)
→ Completer<T>
-
Ensure that a completer is completed when the object is disposed.
inherited
-
manageDisposable(Disposable disposable)
→ void
-
inherited
-
manageStreamController(StreamController controller)
→ void
-
Automatically cancel a stream controller when this object is disposed.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose()
→ Future<Null>
-
Callback to allow arbitrary cleanup on dispose.
-
onWillDispose()
→ Future<Null>
-
Callback to allow arbitrary cleanup as soon as disposal is requested (i.e.
dispose
is called) but prior to disposal actually starting.
inherited
-
show(ToastMessage message)
→ Future<void>
-
override
-
toString()
→ String
-
A string representation of this object.
inherited