when method
void
when({
- required void onBooleanValue(),
- required void onVectorString(),
- required void onVectorEnumValue(
- List<
SearchFeatureEnumValue> value
- List<
Applies the passed function to the variant value.
Implementation
void when({
required void Function(SearchFeatureBooleanValue value) onBooleanValue,
required void Function(core.List<core.String> value) onVectorString,
required void Function(core.List<SearchFeatureEnumValue> value)
onVectorEnumValue,
}) {
if (_value is SearchFeatureBooleanValue) {
return onBooleanValue(_value as SearchFeatureBooleanValue);
}
if (_value is core.List<core.String>) {
return onVectorString(_value as core.List<core.String>);
}
if (_value is core.List<SearchFeatureEnumValue>) {
return onVectorEnumValue(_value as core.List<SearchFeatureEnumValue>);
}
assert(false);
}