whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {TResult? intSelection(
    1. Map<String, Callback> values
    )?,
  2. TResult? boolSelection(
    1. Callback trueCallback,
    2. Callback falseCallback
    )?,
  3. TResult? navigatorPushNamed(
    1. String value,
    2. Map<String, String>? arguments
    )?,
  4. TResult? navigatorPop(
    1. Object? value
    )?,
  5. TResult? launchUrl(
    1. String url,
    2. String? path,
    3. Map<String, String>? params
    )?,
  6. TResult? copyClipboard(
    1. String text,
    2. Callback? callback
    )?,
  7. TResult? networkRequest(
    1. NetworkRequest request,
    2. Callback? callback
    )?,
  8. TResult? showSnackBar(
    1. SnackBar snackBar
    )?,
  9. TResult? hideCurrentSnackBar(
    1. SnackBarClosedReason reason
    )?,
  10. TResult? removeCurrentSnackBar(
    1. SnackBarClosedReason reason
    )?,
  11. TResult? clearMaterialBanners(
      )?,
    1. TResult? hideCurrentMaterialBanner(
      1. MaterialBannerClosedReason reason
      )?,
    2. TResult? removeCurrentMaterialBanner(
      1. MaterialBannerClosedReason reason
      )?,
    3. TResult? showMaterialBanner(
      1. MaterialBanner materialBanner
      )?,
    4. TResult? empty(
        )?,
      1. TResult? reload(
          )?}
        )
        @optionalTypeArgs, inherited

        Implementation

        @optionalTypeArgs
        TResult? whenOrNull<TResult extends Object?>({
          TResult? Function(Map<String, Callback> values)? intSelection,
          TResult? Function(Callback trueCallback, Callback falseCallback)?
              boolSelection,
          TResult? Function(String value, Map<String, String>? arguments)?
              navigatorPushNamed,
          TResult? Function(Object? value)? navigatorPop,
          TResult? Function(String url, String? path, Map<String, String>? params)?
              launchUrl,
          TResult? Function(String text, Callback? callback)? copyClipboard,
          TResult? Function(NetworkRequest request, Callback? callback)?
              networkRequest,
          TResult? Function(SnackBar snackBar)? showSnackBar,
          TResult? Function(SnackBarClosedReason reason)? hideCurrentSnackBar,
          TResult? Function(SnackBarClosedReason reason)? removeCurrentSnackBar,
          TResult? Function()? clearMaterialBanners,
          TResult? Function(MaterialBannerClosedReason reason)?
              hideCurrentMaterialBanner,
          TResult? Function(MaterialBannerClosedReason reason)?
              removeCurrentMaterialBanner,
          TResult? Function(MaterialBanner materialBanner)? showMaterialBanner,
          TResult? Function()? empty,
          TResult? Function()? reload,
        }) =>
            throw _privateConstructorUsedError;