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.
-
Creates a
FlutterStandardTypedDatawhich interprets the specified data as plain bytes.Declaration
Objective-C
+ (nonnull instancetype)typedDataWithBytes:(nonnull NSData *)data;Swift
convenience init(bytes data: Data)Parameters
datathe byte data.
-
Creates a
FlutterStandardTypedDatawhich 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
datathe byte data. The length must be divisible by 4.
-
Creates a
FlutterStandardTypedDatawhich 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
datathe byte data. The length must be divisible by 8.
-
Creates a
FlutterStandardTypedDatawhich interprets the specified data as 32-bit floats.Declaration
Objective-C
+ (nonnull instancetype)typedDataWithFloat32:(nonnull NSData *)data;Swift
convenience init(float32 data: Data)Parameters
datathe byte data. The length must be divisible by 8.
-
Creates a
FlutterStandardTypedDatawhich interprets the specified data as 64-bit floats.Declaration
Objective-C
+ (nonnull instancetype)typedDataWithFloat64:(nonnull NSData *)data;Swift
convenience init(float64 data: Data)Parameters
datathe byte data. The length must be divisible by 8.
-
The raw underlying data buffer.
Declaration
Objective-C
@property (nonatomic, readonly) NSData *_Nonnull data;Swift
var data: Data { get } -
The type of the encoded values.
Declaration
Objective-C
@property (nonatomic, readonly) FlutterStandardDataType type;Swift
var type: FlutterStandardDataType { get } -
The number of value items encoded.
Declaration
Objective-C
@property (nonatomic, readonly) UInt32 elementCount;Swift
var elementCount: UInt32 { get } -
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 }
View on GitHub
Install in Dash
FlutterStandardTypedData Class Reference