PlatformChannel class

One allowlisted channel and the codec its messages use.

Constructors

PlatformChannel.event(String name, {MethodCodec codec = const StandardMethodCodec(), String? codecId})
An EventChannel: listen/cancel calls and the events the platform sends back on the same channel.
const
PlatformChannel.message(String name, {MessageCodec<Object?> codec = const StandardMessageCodec(), String? codecId})
A BasicMessageChannel (StandardMessageCodec by default).
const
PlatformChannel.method(String name, {MethodCodec codec = const StandardMethodCodec(), String? codecId})
A MethodChannel (StandardMethodCodec by default).
const

Properties

codec → String
no setter
codecId → String?
Identifies a custom codec in the capsule; known codecs have ids.
final
hashCode → int
The hash code for this object.
no setterinherited
kind → PlatformChannelKind
final
knownCodec → bool
no setter
messageCodec → MessageCodec<Object?>?
final
methodCodec → MethodCodec?
final
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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