Flutter iOS Embedder
FlutterStandardMessageCodec Class Reference

#import <FlutterCodecs.h>

Inheritance diagram for FlutterStandardMessageCodec:
<FlutterMessageCodec>

Class Methods

(instancetype) + codecWithReaderWriter:
 
- Class Methods inherited from <FlutterMessageCodec>
(instancetype) + sharedInstance
 

Additional Inherited Members

- Instance Methods inherited from <FlutterMessageCodec>
(NSData *_Nullable) - encode:
 
(id _Nullable) - decode:
 

Detailed Description

A FlutterMessageCodec using the Flutter standard binary encoding.

This codec is guaranteed to be compatible with the corresponding StandardMessageCodec on the Dart side. These parts of the Flutter SDK are evolved synchronously.

Supported messages are acyclic values of these forms:

  • nil or NSNull
  • NSNumber (including their representation of Boolean values)
  • NSString
  • FlutterStandardTypedData
  • NSArray of supported values
  • NSDictionary with supported keys and values

On the Dart side, these values are represented as follows:

  • nil or NSNull: null
  • NSNumber: bool, int, or double, depending on the contained value.
  • NSString: String
  • FlutterStandardTypedData: Uint8List, Int32List, Int64List, or Float64List
  • NSArray: List
  • NSDictionary: Map

Definition at line 209 of file FlutterCodecs.h.

Method Documentation

◆ codecWithReaderWriter:

+ (instancetype) codecWithReaderWriter: (FlutterStandardReaderWriter*)  readerWriter

Create a FlutterStandardMessageCodec who will read and write to readerWriter.

Definition at line 24 of file FlutterStandardCodec.mm.

24  :(FlutterStandardReaderWriter*)readerWriter {
25  return [[FlutterStandardMessageCodec alloc] initWithReaderWriter:readerWriter];
26 }

Referenced by TEST().


The documentation for this class was generated from the following files:
FlutterStandardReaderWriter
Definition: FlutterCodecs.h:172
FlutterStandardMessageCodec
Definition: FlutterCodecs.h:209