Frontend mixin

This is the first part of two-class component. Frontend will run in the UI-thread and its purpose is to update the UI after getting messages from the Backend or after calling Backend's methods

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updateOnEveryEvent bool
You can change this getter to update the UI automatically after getting every event from the Backend
no setter

Methods

destroy() Future<void>
Like "dispose()" in different classes
initActions() → void
Method in which you should register all your Frontend handlers (methods, which will call on Backend's messages)
initBackend<T, B extends Backend>({required BackendInitializer<T, B> initializer, IsolatePoolId? poolId, T? data}) Future<void>
This inner method was created to initialize corresponding Backend
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEveryEvent() → void
This hook will be called on every message from the Backend
onForceUpdate() → void
This hook will called if Backend.send method will use forceUpdate: true param
run<Event, Req extends Object?, Res extends Object?>({required Event event, Req? data, Duration? timeout, bool trackTime = false}) Future<Maybe<Res>>
Method for calling the Backend's registered actions from the Frontend
subscribeOnEvent<Event>({required FrontendEventListener<Event> listener, bool single = false, bool onEveryEvent = false, Event? event}) → FrontendEventSubscription<Event>
With this method you can subscribe on every Frontend to getting notifications about new events in this Frontend
toString() String
A string representation of this object.
inherited
whenEventCome<Event>([Event? event]) FrontendActionInitializer<Event>
The same thing as in the Backend - this method using to register Frontend handlers (in initActions method)

Operators

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