whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<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
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<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,
}) =>
    throw _privateConstructorUsedError;