when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. TResult $default(
    1. double horizontal,
    2. double vertical
    ),
  2. {required TResult adaptivePlatformDensity(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult when<TResult extends Object?>(
      TResult Function(double horizontal, double vertical) $default, {
      required TResult Function() adaptivePlatformDensity,
    }) =>
        throw _privateConstructorUsedError;