whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. {TResult? item(
    1. Key? key,
    2. String? value,
    3. Callback? onTap,
    4. bool enabled,
    5. double height,
    6. EdgeInsets? padding,
    7. TextStyle? textStyle,
    8. MouseCursor? mouseCursor,
    9. Widget? child
    )?,
  2. TResult? divider(
    1. Key? key,
    2. double height
    )?,
  3. TResult? checked(
    1. Key? key,
    2. String? value,
    3. bool checked,
    4. bool enabled,
    5. EdgeInsets? padding,
    6. double height,
    7. MouseCursor? mouseCursor,
    8. Widget? child
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(
          Key? key,
          String? value,
          Callback? onTap,
          bool enabled,
          double height,
          EdgeInsets? padding,
          TextStyle? textStyle,
          MouseCursor? mouseCursor,
          Widget? child)?
      item,
  TResult? Function(Key? key, double height)? divider,
  TResult? Function(
          Key? key,
          String? value,
          bool checked,
          bool enabled,
          EdgeInsets? padding,
          double height,
          MouseCursor? mouseCursor,
          Widget? child)?
      checked,
}) =>
    throw _privateConstructorUsedError;