sealed class AppError {
const AppError();
static const none = None();
bool get isError => this is! None;
factory AppError.unknown(String message) => UnknownError(message);
}
final class None extends AppError {
const None() : super();
}
final class UnknownError extends AppError {
final String message;
const UnknownError(this.message);
}