when method
void
when({
- required void onIndoorLevel(
- MasstransitIndoorLevel value
- required void onConnector(
- MasstransitConnector value
Applies the passed function to the variant value.
Implementation
void when({
required void Function(MasstransitIndoorLevel value) onIndoorLevel,
required void Function(MasstransitConnector value) onConnector,
}) {
if (_value is MasstransitIndoorLevel) {
return onIndoorLevel(_value as MasstransitIndoorLevel);
}
if (_value is MasstransitConnector) {
return onConnector(_value as MasstransitConnector);
}
assert(false);
}