when<TResult extends Object?> method

  1. @optionalTypeArgs
TResult when<TResult extends Object?>({
  1. required TResult success(
    1. T data
    ),
  2. required TResult failure(
    1. String error
    ),
})
inherited

Implementation

@optionalTypeArgs
TResult when<TResult extends Object?>({
  required TResult Function(T data) success,
  required TResult Function(String error) failure,
}) =>
    throw _privateConstructorUsedError;