when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. {required TResult initial(
      ),
    1. required TResult data(
      1. T value
      ),
    2. required TResult loading(
        ),
      1. required TResult error(
        1. dynamic error
        )}
      )
      @optionalTypeArgs, inherited

      Implementation

      @optionalTypeArgs
      TResult when<TResult extends Object?>({
        required TResult Function() initial,
        required TResult Function(T value) data,
        required TResult Function() loading,
        required TResult Function(dynamic error) error,
      }) =>
          throw _privateConstructorUsedError;