maybeWhen<TResult extends Object?>  method 
      
  
TResult
maybeWhen<TResult extends Object?>( 
    
- TResult $default(- List<Relay> relays,
- Map<String, RequiredNamespace> requiredNamespaces,
- Map<String, RequiredNamespace> ? optionalNamespaces,
- Map<String, String> ? sessionProperties,
- ConnectionMetadata proposer,
 
- List<
- required TResult orElse(),
A variant of when that fallback to an orElse callback.
It is equivalent to doing:
switch (sealedClass) {
  case Subclass(:final field):
    return ...;
  case _:
    return orElse();
}
Implementation
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Relay> relays,  Map<String, RequiredNamespace> requiredNamespaces,  Map<String, RequiredNamespace>? optionalNamespaces,  Map<String, String>? sessionProperties,  ConnectionMetadata proposer)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _WcSessionProposeRequest() when $default != null:
return $default(_that.relays,_that.requiredNamespaces,_that.optionalNamespaces,_that.sessionProperties,_that.proposer);case _:
  return orElse();
}
}