maybeWhen<TResult extends Object?>  method 
      
  
TResult
maybeWhen<TResult extends Object?>( 
    
- TResult $default(- bool showErrorMsg,
- String loadingText,
- String? contentType,
- Map<String, dynamic> headers,
- bool showDefaultLoading,
- dynamic data,
- ResponseType? responseType,
- bool? nullParams,
- RequestEncoder? requestEncoder,
- DioStart? dioStart,
- bool? returnIsString,
- String? fullUrl,
- InterceptorCall? interceptorCall,
- UrlParseFormat? urlParseFormat,
- ResponseResultCallback? responseResultCallback,
- Map<String, dynamic> ? extra,
- CancelToken? cancelToken,
- ProgressCallback? onSendCallback,
- ProgressCallback? onReceiveProgress,
- String? downloadUrl,
- File? savePath,
 
- 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(
          bool showErrorMsg,
          String loadingText,
          String? contentType,
          Map<String, dynamic> headers,
          bool showDefaultLoading,
          @JsonKey(name: 'data', toJson: _dataToJson) dynamic data,
          ResponseType? responseType,
          bool? nullParams,
          @igFreezedJson RequestEncoder? requestEncoder,
          @igFreezedJson DioStart? dioStart,
          bool? returnIsString,
          @igFreezedJson String? fullUrl,
          @igFreezedJson InterceptorCall? interceptorCall,
          @igFreezedJson UrlParseFormat? urlParseFormat,
          @igFreezedJson ResponseResultCallback? responseResultCallback,
          Map<String, dynamic>? extra,
          @igFreezedJson CancelToken? cancelToken,
          @igFreezedJson ProgressCallback? onSendCallback,
          @igFreezedJson ProgressCallback? onReceiveProgress,
          String? downloadUrl,
          @igFreezedJson File? savePath)?
      $default, {
  required TResult orElse(),
}) {
  final _that = this;
  switch (_that) {
    case _RequestParams() when $default != null:
      return $default(
          _that.showErrorMsg,
          _that.loadingText,
          _that.contentType,
          _that.headers,
          _that.showDefaultLoading,
          _that.data,
          _that.responseType,
          _that.nullParams,
          _that.requestEncoder,
          _that.dioStart,
          _that.returnIsString,
          _that.fullUrl,
          _that.interceptorCall,
          _that.urlParseFormat,
          _that.responseResultCallback,
          _that.extra,
          _that.cancelToken,
          _that.onSendCallback,
          _that.onReceiveProgress,
          _that.downloadUrl,
          _that.savePath);
    case _:
      return orElse();
  }
}