map<R> method
R
map<R>({
- required ResponseMap<
NodesPathPrefixGetResponse200, R> on200, - ResponseMap<
NodesPathPrefixGetResponse, R> ? onElse,
Implementation
R map<R>({
required ResponseMap<NodesPathPrefixGetResponse200, R> on200,
ResponseMap<NodesPathPrefixGetResponse, R>? onElse,
}) {
if (this is NodesPathPrefixGetResponse200) {
return on200((this as NodesPathPrefixGetResponse200));
} else if (onElse != null) {
return onElse(this);
} else {
throw StateError('Invalid instance of type $this');
}
}