Add warp config generator

This commit is contained in:
problematicconsumer
2024-02-18 12:35:11 +03:30
parent ce6ab59bf7
commit 33dc21918d
15 changed files with 459 additions and 973 deletions

View File

@@ -14,6 +14,9 @@ sealed class ConfigOptionFailure with _$ConfigOptionFailure, Failure {
StackTrace? stackTrace,
]) = ConfigOptionUnexpectedFailure;
@With<ExpectedFailure>()
const factory ConfigOptionFailure.missingWarp() = MissingWarpConfigFailure;
@override
({String type, String? message}) present(TranslationsEn t) {
return switch (this) {
@@ -21,6 +24,10 @@ sealed class ConfigOptionFailure with _$ConfigOptionFailure, Failure {
type: t.failure.unexpected,
message: null,
),
MissingWarpConfigFailure() => (
type: t.settings.config.missingWarpConfig,
message: null,
),
};
}
}