# FlutterStandardTypedData

Objective-C

    @interface FlutterStandardTypedData : NSObject

Swift

    class FlutterStandardTypedData : NSObject

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.

- `+typedDataWithBytes:`

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

  #### Declaration

  Objective-C

      + (nonnull instancetype)typedDataWithBytes:(nonnull NSData *)data;

  Swift

      convenience init(bytes data: Data)

  #### Parameters

  `data` | the byte data.

- `+typedDataWithInt32:`

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

  #### Declaration

  Objective-C

      + (nonnull instancetype)typedDataWithInt32:(nonnull NSData *)data;

  Swift

      convenience init(int32 data: Data)

  #### Parameters

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

- `+typedDataWithInt64:`

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

  #### Declaration

  Objective-C

      + (nonnull instancetype)typedDataWithInt64:(nonnull NSData *)data;

  Swift

      convenience init(int64 data: Data)

  #### Parameters

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

- `+typedDataWithFloat32:`

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

  #### Declaration

  Objective-C

      + (nonnull instancetype)typedDataWithFloat32:(nonnull NSData *)data;

  Swift

      convenience init(float32 data: Data)

  #### Parameters

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

- `+typedDataWithFloat64:`

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

  #### Declaration

  Objective-C

      + (nonnull instancetype)typedDataWithFloat64:(nonnull NSData *)data;

  Swift

      convenience init(float64 data: Data)

  #### Parameters

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

- `data`

  The raw underlying data buffer.

  #### Declaration

  Objective-C

      @property (nonatomic, readonly) NSData *_Nonnull data;

  Swift

      var data: Data { get }

- `type`

  The type of the encoded values.

  #### Declaration

  Objective-C

      @property (nonatomic, readonly) FlutterStandardDataType type;

  Swift

      var type: FlutterStandardDataType { get }

- `elementCount`

  The number of value items encoded.

  #### Declaration

  Objective-C

      @property (nonatomic, readonly) UInt32 elementCount;

  Swift

      var elementCount: UInt32 { get }

- `elementSize`

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

  #### Declaration

  Objective-C

      @property (nonatomic, readonly) UInt8 elementSize;

  Swift

      var elementSize: UInt8 { get }

© 2023 Flutter. All rights reserved. (Last updated: 2023-03-28)

Generated by jazzy ♪♫ v0.14.3, a Realm project.