map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult mobile(
- NetworkTypeMobile value
- required TResult mobileRoaming(
- NetworkTypeMobileRoaming value
- required TResult none(
- NetworkTypeNone value
- required TResult other(
- NetworkTypeOther value
- required TResult wiFi(
- NetworkTypeWiFi value
Implementation
TResult map<TResult extends Object?>({
required TResult Function(NetworkTypeMobile value) mobile,
required TResult Function(NetworkTypeMobileRoaming value) mobileRoaming,
required TResult Function(NetworkTypeNone value) none,
required TResult Function(NetworkTypeOther value) other,
required TResult Function(NetworkTypeWiFi value) wiFi,
}) {
switch (getConstructor()) {
case NetworkTypeMobile.constructor:
return mobile.call(this as NetworkTypeMobile);
case NetworkTypeMobileRoaming.constructor:
return mobileRoaming.call(this as NetworkTypeMobileRoaming);
case NetworkTypeNone.constructor:
return none.call(this as NetworkTypeNone);
case NetworkTypeOther.constructor:
return other.call(this as NetworkTypeOther);
case NetworkTypeWiFi.constructor:
return wiFi.call(this as NetworkTypeWiFi);
}
throw StateError('not handled type Generator');
}