maybeWhen<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult maybeWhen<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
    )?,
  3. required TResult orElse(
      )}
    )
    @optionalTypeArgs, inherited

    Implementation

    @optionalTypeArgs
    TResult maybeWhen<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,
      required TResult orElse(),
    }) =>
        throw _privateConstructorUsedError;