Flutter iOS Embedder
ExtendedReader Class Reference
Inheritance diagram for ExtendedReader:
FlutterStandardReader

Instance Methods

(id) - readValueOfType:
 
- Instance Methods inherited from FlutterStandardReader
(instancetype) - initWithData:
 
(BOOL) - hasMore
 
(UInt8) - readByte
 
(void) - readBytes:length:
 
(NSData *) - readData:
 
(UInt32) - readSize
 
(void) - readAlignment:
 
(NSString *) - readUTF8
 
(nullable id) - readValue
 

Detailed Description

Definition at line 56 of file flutter_standard_codec_unittest.mm.

Method Documentation

◆ readValueOfType:

- (id) readValueOfType: (UInt8)  type

Decodes a value matching the type specified.

See also:

Reimplemented from FlutterStandardReader.

Definition at line 61 of file flutter_standard_codec_unittest.mm.

61  :(UInt8)type {
62  switch (type) {
63  case kDATE: {
64  SInt64 value;
65  [self readBytes:&value length:8];
66  NSTimeInterval time = [NSNumber numberWithLong:value].doubleValue / 1000.0;
67  return [NSDate dateWithTimeIntervalSince1970:time];
68  }
69  case kPAIR: {
70  return [[Pair alloc] initWithLeft:[self readValue] right:[self readValue]];
71  }
72  default:
73  return [super readValueOfType:type];
74  }
75 }

References kDATE, kPAIR, FlutterStandardReader::readBytes:length:, FlutterStandardReader::readValue, and FlutterStandardReader::readValueOfType:.


The documentation for this class was generated from the following file:
Pair
Definition: flutter_standard_codec_unittest.mm:13
kDATE
static const UInt8 kDATE
Definition: flutter_standard_codec_unittest.mm:30
kPAIR
static const UInt8 kPAIR
Definition: flutter_standard_codec_unittest.mm:31