whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. TResult? $default(
    1. Key? key,
    2. bool selected,
    3. Callback? onSelect,
    4. Callback? onDeselect,
    5. Callback? onLongPress,
    6. MaterialStateProperty? color,
    7. List<DataCell> cells
    )?,
  2. {TResult? byIndex(
    1. int? index,
    2. bool selected,
    3. Callback? onSelect,
    4. Callback? onDeselect,
    5. Callback? onLongPress,
    6. MaterialStateProperty? color,
    7. List<DataCell> cells
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  TResult? Function(
          Key? key,
          bool selected,
          Callback? onSelect,
          Callback? onDeselect,
          Callback? onLongPress,
          MaterialStateProperty? color,
          List<DataCell> cells)?
      $default, {
  TResult? Function(
          int? index,
          bool selected,
          Callback? onSelect,
          Callback? onDeselect,
          Callback? onLongPress,
          MaterialStateProperty? color,
          List<DataCell> cells)?
      byIndex,
}) =>
    throw _privateConstructorUsedError;