maybeWhen<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
  1. {TResult bytes(
    1. List<int> bytes,
    2. double scale
    )?,
  2. TResult asset(
    1. String path,
    2. String? package
    )?,
  3. TResult network(
    1. String url,
    2. double scale,
    3. Map<String, String>? headers
    )?,
  4. required TResult orElse(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult maybeWhen<TResult extends Object?>({
      TResult Function(List<int> bytes, double scale)? bytes,
      TResult Function(String path, String? package)? asset,
      TResult Function(String url, double scale, Map<String, String>? headers)?
          network,
      required TResult orElse(),
    }) =>
        throw _privateConstructorUsedError;