WasmComponentValueData constructor
WasmComponentValueData({
- required WasmComponentValueDataKind kind,
- required Uint8List rawBytes,
- bool? boolean,
- Object? integer,
- double? floatingPoint,
- String? string,
- List<
WasmComponentValueData> items = const <WasmComponentValueData>[], - List<
Object?> ? runtimeItems, - int? index,
- String? label,
- List<
String> labels = const <String>[], - WasmComponentValueData? associatedValue,
- Object? associatedPayload,
- bool? isSome,
- bool? isOk,
Implementation
WasmComponentValueData({
required this.kind,
required this.rawBytes,
this.boolean,
this.integer,
this.floatingPoint,
this.string,
this.items = const <WasmComponentValueData>[],
this.runtimeItems,
this.index,
this.label,
this.labels = const <String>[],
this.associatedValue,
this.associatedPayload,
this.isSome,
this.isOk,
}) {
if (associatedValue != null && associatedPayload != null) {
throw ArgumentError(
'A Wasm component value cannot have both associatedValue and '
'associatedPayload.',
);
}
if (runtimeItems != null && items.isNotEmpty) {
throw ArgumentError(
'A Wasm component value cannot have both static items and runtime '
'items.',
);
}
}