MethodCodec class
A codec for method calls and enveloped results.
All operations throw an exception, if conversion fails.
See also:
- MethodChannel, which use MethodCodecs for communication between Flutter and platform plugins.
- EventChannel, which use MethodCodecs for communication between Flutter and platform plugins.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
decodeEnvelope(
ByteData envelope) → dynamic -
Decodes the specified result
envelope
from binary. [...] -
decodeMethodCall(
ByteData methodCall) → MethodCall -
Decodes the specified
methodCall
from binary. -
encodeErrorEnvelope(
{String code, String message, dynamic details }) → ByteData - Encodes an error result into a binary envelope. [...]
-
encodeMethodCall(
MethodCall methodCall) → ByteData -
Encodes the specified
methodCall
into binary. -
encodeSuccessEnvelope(
dynamic result) → ByteData -
Encodes a successful
result
into a binary envelope. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited