when<TResult extends Object?> method Null safety

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

Implementation

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