Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -8,12 +8,12 @@ sealed class LoadingState<T> {
bool get isSuccess => this is Success<T>;
T get data => switch (this) {
Success(:var response) => response,
Success(:final response) => response,
_ => throw this,
};
T? get dataOrNull => switch (this) {
Success(:var response) => response,
Success(:final response) => response,
_ => null,
};