FlutterStandardTypedData

@interface 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.

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

    Declaration

    Objective-C

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

    Parameters

    data

    the byte data.

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

    Declaration

    Objective-C

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

    Parameters

    data

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

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

    Declaration

    Objective-C

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

    Parameters

    data

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

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

    Declaration

    Objective-C

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

    Parameters

    data

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

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

    Declaration

    Objective-C

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

    Parameters

    data

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

  • The raw underlying data buffer.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSData *_Nonnull data;
  • The type of the encoded values.

    Declaration

    Objective-C

    @property (nonatomic, readonly) FlutterStandardDataType type;
  • The number of value items encoded.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UInt32 elementCount;
  • The number of bytes used by the encoding of a single value item.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UInt8 elementSize;