| Flutter iOS Embedder |

Instance Methods | List of all members
ExtendedWriter Class Reference
Inheritance diagram for ExtendedWriter:

## Instance Methods
(void) | - writeValue:
Instance Methods inherited from FlutterStandardWriter
(instancetype) | - initWithData:
(void) | - writeByte:
(void) | - writeBytes:length:
(void) | - writeData:
(void) | - writeSize:
(void) | - writeAlignment:
(void) | - writeUTF8:

## Detailed Description

Definition at line 31 of file flutter_standard_codec_unittest.mm.

## Method Documentation

## ◆ writeValue:

- (void) writeValue: |  | (id) | value |

Introspects into an object and writes its representation.

Supported Data Types:

- NSNull
- NSNumber
- NSString (as UTF-8)
- FlutterStandardTypedData
- NSArray of supported types
- NSDictionary of supporte types

NSAsserts on failure.

Reimplemented from FlutterStandardWriter.

Definition at line 36 of file flutter_standard_codec_unittest.mm.

36 :(id)value {
37 if ([value isKindOfClass:[NSDate class]]) {
38 [self writeByte:kDATE];
39 NSDate* date = value;
40 NSTimeInterval time = date.timeIntervalSince1970;
41 SInt64 ms = (SInt64)(time * 1000.0);
42 [self writeBytes:&ms length:8];
43 } else if ([value isKindOfClass:[Pair class]]) {
44 Pair* pair = value;
45 [self writeByte:kPAIR];
46 [self writeValue:pair.left];
47 [self writeValue:pair.right];
48 } else {
49 [super writeValue:value];
50 }
51 }

References FlutterStandardWriter::writeByte:, FlutterStandardWriter::writeBytes:length:, writeValue:, and FlutterStandardWriter::writeValue:.

Referenced by writeValue:.

The documentation for this class was generated from the following file:

- shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm

Pair
Definition: flutter_standard_codec_unittest.mm:11