value property
Object?
get
value
Value to set. Leave unset to request automatic setting for options that
have autoSettable
enabled. The type supplied for
value
must match type
.
Implementation
Object? get value => _wrapped.value?.when(
isBool: (v) => v,
isDouble: (v) => v,
isArray: (v) => v.toDart.cast<double>().map((e) => e).toList(),
isInt: (v) => v,
isString: (v) => v,
);
set
value
(Object? v)
Implementation
set value(Object? v) {
_wrapped.value = switch (v) {
bool() => v.jsify()!,
double() => v.jsify()!,
List<double>() => v.toJSArray((e) => e),
int() => v.jsify()!,
List<int>() => v.toJSArray((e) => e),
String() => v.jsify()!,
null => null,
_ => throw UnsupportedError(
'Received type: ${v.runtimeType}. Supported types are: bool, double, List<double>, int, List<int>, String')
};
}