Frontend<TEvent > mixin
Properties
backendSendPort
→ SendPort
no setter
errorsHandlers
→ Map <TEvent , ErrorHandler >
Functions (handlers), which will executed, when error was thrown in backend after sending corresponding message with eventId
from frontend
each handler can have a one dynamic argument - then in that handlers will pass a error
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
tasks
→ Map <TEvent , Function >
Functions (tasks), which will executed by frontend on accordingly to events from backend
no setter
Methods
initBackend <TDataType > (Creator <TDataType > creator , {required Type backendType , TDataType? data , ErrorHandler ? errorHandler , String uniqueId = '' , bool isMessageBus = false })
→ Future <void >
Method for creating backend of this frontend state
killBackend ()
→ void
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onBackendResponse ()
→ void
Hook on every data, passed from backend to frontend
onError (dynamic error )
→ Future <void >
Hook on every error
onEvent (TEvent event , Function func )
→ void
Method for creating disposable, single-use subscriptions
runBackendMethod <TVal extends Object , TResponse extends Object > (TEvent eventId , [TVal? value ])
→ Future <TResponse >
Method for sending event with any data to backend
send (TEvent eventId , [Object ? value ])
→ void
Method for sending event with any data to backend
toString ()
→ String
A string representation of this object.
inherited