MethodChannelBonsoirAction<T extends BonsoirEvent> class
abstract
Abstract class that contains all methods that are communicating with the native side of the plugin.
- Inheritance
-
- Object
- BonsoirAction<
T> - MethodChannelBonsoirAction
Constructors
- MethodChannelBonsoirAction.new({required String classType, bool printLogs = kDebugMode})
- Creates a new Bonsoir class instance.
Properties
-
eventStream
→ Stream<
T> ? -
The event stream.
Subscribe to it to receive this instance updates.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReady → bool
-
This returns whether the platform is ready for this action.
no setteroverride
- isStopped → bool
-
This returns whether the platform has discarded this action.
no setteroverride
- printLogs → bool
-
Whether to print logs.
final
-
ready
→ Future<
void> -
The ready getter, that returns when the platform is ready for the operation requested.
Await this method to know when the plugin will be ready.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
invokeMethod<
R> (String method, [Map< String, dynamic> ? arguments]) → Future<R?> - Invokes a method on the method channel.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → Future< void> -
This starts the required action (eg. discovery, or broadcast).
override
-
stop(
) → Future< void> -
This stops the action (eg. stops discovery or broadcast).
override
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
transformPlatformEvent(
dynamic event) → T -
Transforms the stream data to a
T
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited