ComponentsBinding mixin
Main app binding, controls the root component and global state
- Superclass Constraints
- Mixin Applications
Properties
- currentUri → Uri
-
The currently active uri.
On the server, this is the requested uri. On the client, this is the
currently visited uri in the browser.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClient → bool
-
Whether the current app is run on the client (in the browser)
no setterinherited
- isLoadingState → bool
-
no setterinherited
- rootElement → RenderObjectElement?
-
The Element that is at the root of the hierarchy.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schedulerPhase → SchedulerPhase
-
no setterinherited
Methods
-
addPostFrameCallback(
VoidCallback callback) → void -
inherited
-
attachRootComponent(
Component app) → Future< void> -
Sets
app
as the new root of the component tree and performs an initial build -
createRootBuildOwner(
) → BuildOwner -
createRootRenderObject(
) → RenderObject -
didAttachRootElement(
Element element) → void -
fetchState(
String url) → Future< Map< String, dynamic> > -
On the client, this should perform a http request to
url
to fetch state data from the server.inherited -
getInitialState<
T> (String id, {Codec< T, dynamic> ? codec}) → T? -
inherited
-
getRawState(
String id) → dynamic -
Must return the serialized state data associated with
id
. On the client this is the data that is synced from the server.inherited -
getStateData(
) → Map< String, dynamic> -
Returns the accumulated data from all active States that use the SyncStateMixin
inherited
-
loadState(
String path) → Future< void> -
Loads state from the server and and notifies elements.
This is called when a
LazyRoute
is loaded.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerSyncState(
SyncState syncState, {bool initialUpdate = true}) → void -
inherited
-
scheduleBuild(
VoidCallback buildCallback) → void -
Schedules a build and ultimately calls
handleFrame
with the providedbuildCallback
inherited -
scheduleFrame(
VoidCallback frameCallback) → void -
Schedules a frame with the provided
frameCallback
inherited -
toString(
) → String -
A string representation of this object.
inherited
-
unregisterSyncState(
SyncState syncState) → void -
inherited
-
updateRawState(
String id, dynamic state) → void -
Must update the serialized state data associated with
id
. This is called on the client when new data is loaded for aLazyRoute
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited