JSONMessageCodec class Null safety
MessageCodec with UTF-8 encoded JSON messages.
Supported messages are acyclic values of these forms:
On Android, messages are decoded using the
On iOS, messages are decoded using the
In both cases, the use of top-level simple messages (null, bool, num,
and String) is supported (by the Flutter SDK). The decoded value will be
null/nil for null, and identical to what would result from decoding a
singleton JSON array with a Boolean, number, or string value, and then
extracting its single element.
The type returned from decodeMessage is
means no type checking is performed on its return value. It is strongly
recommended that the return value be immediately cast to a known type to
prevent runtime errors due to typos that the type checker could otherwise
ByteData? message) → dynamic
Decodes the specified
Object? message) → ByteData?
Encodes the specified
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
) → String
A string representation of this object.