when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. TResult $default(
    1. double? left,
    2. double? top,
    3. double? right,
    4. double? bottom
    ),
  2. {required TResult margin(
    1. double? left,
    2. double? top,
    3. double? right,
    4. double? bottom
    ),
  3. required TResult padding(
    1. double? left,
    2. double? top,
    3. double? right,
    4. double? bottom
    )}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult when<TResult extends Object?>(
  TResult Function(double? left, double? top, double? right, double? bottom)
      $default, {
  required TResult Function(
          double? left, double? top, double? right, double? bottom)
      margin,
  required TResult Function(
          double? left, double? top, double? right, double? bottom)
      padding,
}) =>
    throw _privateConstructorUsedError;