maybeWhen<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
  1. TResult $default(
    1. double size
    )?,
  2. {TResult height(
    1. double size
    )?,
  3. TResult maxHeight(
    1. double size
    )?,
  4. TResult minHeight(
    1. double size
    )?,
  5. TResult width(
    1. double size
    )?,
  6. TResult maxWidth(
    1. double size
    )?,
  7. TResult minWidth(
    1. double size
    )?,
  8. TResult gap(
    1. double size
    )?,
  9. required TResult orElse(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult maybeWhen<TResult extends Object?>(
      TResult Function(double size)? $default, {
      TResult Function(double size)? height,
      TResult Function(double size)? maxHeight,
      TResult Function(double size)? minHeight,
      TResult Function(double size)? width,
      TResult Function(double size)? maxWidth,
      TResult Function(double size)? minWidth,
      TResult Function(double size)? gap,
      required TResult orElse(),
    }) =>
        throw _privateConstructorUsedError;