when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. {required 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. required TResult divider(
    1. Key? key,
    2. double height
    ),
  3. required 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 when<TResult extends Object?>({
  required TResult Function(
          Key? key,
          String? value,
          Callback? onTap,
          bool enabled,
          double height,
          EdgeInsets? padding,
          TextStyle? textStyle,
          MouseCursor? mouseCursor,
          Widget? child)
      item,
  required TResult Function(Key? key, double height) divider,
  required TResult Function(
          Key? key,
          String? value,
          bool checked,
          bool enabled,
          EdgeInsets? padding,
          double height,
          MouseCursor? mouseCursor,
          Widget? child)
      checked,
}) =>
    throw _privateConstructorUsedError;