MessageSerializer class

Default class to serialize Message instances to JSON.

Constructors

MessageSerializer({DecoderCallback decoder = jsonDecode, EncoderCallback encoder = jsonEncode})
Default constructor returning the singleton instance of this class.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(dynamic rawData) Message
Yield a Message from some raw string arriving from a websocket.
encode(Message message) String
Given a Message, return the raw string that would be sent through a websocket.
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