failure top-level constant

List<String> const failure

Implementation

const failure = [
  "import 'package:{app}/core/either.core.dart';",
  "",
  "/// Aliasing for Either<Failure,?>",
  "typedef Fallible<T> = Either<Failure, T>;",
  "",
  "/// Base class for all types of failures.",
  "class Failure implements Exception {",
  "  final String? cause;",
  "  final Error? error;",
  "",
  "  Failure({",
  "    this.cause,",
  "    this.error,",
  "  });",
  "}",
];