| Flutter iOS Embedder |

Class Methods | Properties | List of all members
FlutterStandardTypedData Class Reference

`#import <FlutterCodecs.h>`

Inheritance diagram for FlutterStandardTypedData:

## Class Methods
(instancetype) | + typedDataWithBytes:
(instancetype) | + typedDataWithInt32:
(instancetype) | + typedDataWithInt64:
(instancetype) | + typedDataWithFloat32:
(instancetype) | + typedDataWithFloat64:

## Properties
NSData * | data
FlutterStandardDataType | type
UInt32 | elementCount
UInt8 | elementSize

## Detailed Description

A byte buffer holding `UInt8`, `SInt32`, `SInt64`, or `Float64` values, used with `FlutterStandardMessageCodec` and `FlutterStandardMethodCodec`.

Two's complement encoding is used for signed integers. IEEE754 double-precision representation is used for floats. The platform's native endianness is assumed.

Definition at line 300 of file FlutterCodecs.h.

## Method Documentation

## ◆ typedDataWithBytes:

+ (instancetype) typedDataWithBytes: |  | (NSData*) | data |

Creates a `FlutterStandardTypedData` which interprets the specified data as plain bytes.

Parameters

  data | the byte data.

Definition at line 146 of file FlutterStandardCodec.mm.

146 :(NSData*)data {
147 return [FlutterStandardTypedData typedDataWithData:data type:FlutterStandardDataTypeUInt8];
148 }

Referenced by TEST().

## ◆ typedDataWithFloat32:

+ (instancetype) typedDataWithFloat32: |  | (NSData*) | data |

Creates a `FlutterStandardTypedData` which interprets the specified data as 32-bit floats.

Parameters

  data | the byte data. The length must be divisible by 8.

Definition at line 158 of file FlutterStandardCodec.mm.

158 :(NSData*)data {
159 return [FlutterStandardTypedData typedDataWithData:data type:FlutterStandardDataTypeFloat32];
160 }

Referenced by TEST().

## ◆ typedDataWithFloat64:

+ (instancetype) typedDataWithFloat64: |  | (NSData*) | data |

Creates a `FlutterStandardTypedData` which interprets the specified data as 64-bit floats.

Parameters

  data | the byte data. The length must be divisible by 8.

Definition at line 162 of file FlutterStandardCodec.mm.

162 :(NSData*)data {
163 return [FlutterStandardTypedData typedDataWithData:data type:FlutterStandardDataTypeFloat64];
164 }

Referenced by TEST().

## ◆ typedDataWithInt32:

+ (instancetype) typedDataWithInt32: |  | (NSData*) | data |

Creates a `FlutterStandardTypedData` which interprets the specified data as 32-bit signed integers.

Parameters

  data | the byte data. The length must be divisible by 4.

Definition at line 150 of file FlutterStandardCodec.mm.

150 :(NSData*)data {
151 return [FlutterStandardTypedData typedDataWithData:data type:FlutterStandardDataTypeInt32];
152 }

Referenced by TEST().

## ◆ typedDataWithInt64:

+ (instancetype) typedDataWithInt64: |  | (NSData*) | data |

Creates a `FlutterStandardTypedData` which interprets the specified data as 64-bit signed integers.

Parameters

  data | the byte data. The length must be divisible by 8.

Definition at line 154 of file FlutterStandardCodec.mm.

154 :(NSData*)data {
155 return [FlutterStandardTypedData typedDataWithData:data type:FlutterStandardDataTypeInt64];
156 }

Referenced by TEST().

## Property Documentation

## ◆ data

- (NSData*) data
| read nonatomic assign

The raw underlying data buffer.

Definition at line 344 of file FlutterCodecs.h.

## ◆ elementCount

- (UInt32) elementCount
| read nonatomic assign

The number of value items encoded.

Definition at line 354 of file FlutterCodecs.h.

## ◆ elementSize

- (UInt8) elementSize
| read nonatomic assign

The number of bytes used by the encoding of a single value item.

Definition at line 359 of file FlutterCodecs.h.

## ◆ type

- (FlutterStandardDataType) type
| read nonatomic assign

The type of the encoded values.

Definition at line 349 of file FlutterCodecs.h.

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

- shell/platform/darwin/common/framework/Headers/FlutterCodecs.h
- shell/platform/darwin/common/framework/Source/FlutterStandardCodec.mm

FlutterStandardTypedData
Definition: FlutterCodecs.h:300
FlutterStandardTypedData::data
NSData * data
Definition: FlutterCodecs.h:344