Result<T>.error constructor

Result<T>.error(
  1. String error
)

Implementation

factory Result.error(String error) {
  return Result(data: null, isSuccess: false, isLoading: false, error: error);
}