match<T> method
T
match<T>({
- required T empty(),
- required T boolean(
- bool value
- required T number(
- double value
- required T integer(
- int value
- required T string(
- String value
- required T data(
- ByteData value
- required T array(
- List<
AttributeValue> value
- List<
- required T object(
- Map<
String, AttributeValue> value
- Map<
Implementation
T match<T>({
required T Function() empty,
required T Function(bool value) boolean,
required T Function(double value) number,
required T Function(int value) integer,
required T Function(String value) string,
required T Function(ByteData value) data,
required T Function(List<AttributeValue> value) array,
required T Function(core.Map<String, AttributeValue> value) object,
}) {
return switch (this._index) {
0 => empty(),
1 => boolean(this._value as bool),
2 => number(this._value as double),
3 => integer(this._value as int),
4 => string(this._value as String),
5 => data(this._value as ByteData),
6 => array(this._value as List<AttributeValue>),
7 => object(this._value as core.Map<String, AttributeValue>),
_ => throw NativeException("Unrecognized case index ${this._index}")
};
}