LoadResult<T>.fail constructor

LoadResult<T>.fail(
  1. String error, {
  2. List<String>? warnings,
})

Create a failed result.

Implementation

factory LoadResult.fail(String error, {List<String>? warnings}) {
  return LoadResult(
    success: false,
    error: error,
    warnings: warnings ?? [],
  );
}