AppContextEvents class

It's common that you want to fire an event, but only within the "app" context, ie. inside of a MaterialApp or CupertinoApp. This service lets you fire those events anywhere in the codebase, and they will get picked up and run inside the appropriate context.

Implemented types

Constructors

AppContextEvents()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<AppContextHandler>
Listens to the events coming from the stream. This should only happen once for the lifecycle of your code.
no setter
uid String
final

Methods

dispose() FutureOr
override
doWithAppContext(AppContextHandler onTap) → void
Runs the block of code with a BuildContext that resides inside the "App", CupertinoApp or MaterialApp. This code will only run once.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) AppContextEvents