Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -8,14 +8,14 @@ sealed class LoadingState<T> {
bool get isSuccess => this is Success<T>;
T get data => switch (this) {
Success(:var response) => response,
_ => throw this,
};
Success(:var response) => response,
_ => throw this,
};
T? get dataOrNull => switch (this) {
Success(:var response) => response,
_ => null,
};
Success(:var response) => response,
_ => null,
};
void toast() => SmartDialog.showToast(toString());
}