whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {TResult? box(
    1. Color? color,
    2. DecorationImage? image,
    3. ShapeBorder? border,
    4. BorderRadius? borderRadius,
    5. List<BoxShadow>? boxShadow,
    6. Gradient? gradient,
    7. BlendMode? backgroundBlendMode,
    8. BoxShape shape
    )?,
  2. TResult? shape(
    1. Color? color,
    2. DecorationImage? image,
    3. Gradient? gradient,
    4. List<BoxShadow>? shadows,
    5. ShapeBorder shape
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(
          Color? color,
          DecorationImage? image,
          ShapeBorder? border,
          BorderRadius? borderRadius,
          List<BoxShadow>? boxShadow,
          Gradient? gradient,
          BlendMode? backgroundBlendMode,
          BoxShape shape)?
      box,
  TResult? Function(Color? color, DecorationImage? image, Gradient? gradient,
          List<BoxShadow>? shadows, ShapeBorder shape)?
      shape,
}) =>
    throw _privateConstructorUsedError;