FlutterMessageCodec
@protocol FlutterMessageCodec
A message encoding/decoding mechanism.
-
Returns a shared instance of this
FlutterMessageCodec
.Declaration
Objective-C
+ (nonnull instancetype)sharedInstance;
-
Encodes the specified message into binary.
Declaration
Objective-C
- (NSData *_Nullable)encode:(id _Nullable)message;
Parameters
message
The message.
Return Value
The binary encoding, or
nil
, ifmessage
wasnil
. -
Decodes the specified message from binary.
Declaration
Objective-C
- (id _Nullable)decode:(NSData *_Nullable)message;
Parameters
message
The message.
Return Value
The decoded message, or
nil
, ifmessage
wasnil
.