when method
void
when({
- required void onVectorBooleanValue(),
- required void onVectorEnumValue(),
- required void onRangeValue(),
- required void onDateValue(),
Applies the passed function to the variant value.
Implementation
void when({
required void Function(core.List<SearchBusinessFilterBooleanValue> value)
onVectorBooleanValue,
required void Function(core.List<SearchBusinessFilterEnumValue> value)
onVectorEnumValue,
required void Function(SearchBusinessFilterRangeValue value) onRangeValue,
required void Function(SearchBusinessFilterDateValue value) onDateValue,
}) {
if (_value is core.List<SearchBusinessFilterBooleanValue>) {
return onVectorBooleanValue(
_value as core.List<SearchBusinessFilterBooleanValue>);
}
if (_value is core.List<SearchBusinessFilterEnumValue>) {
return onVectorEnumValue(
_value as core.List<SearchBusinessFilterEnumValue>);
}
if (_value is SearchBusinessFilterRangeValue) {
return onRangeValue(_value as SearchBusinessFilterRangeValue);
}
if (_value is SearchBusinessFilterDateValue) {
return onDateValue(_value as SearchBusinessFilterDateValue);
}
assert(false);
}