added support for multiple accounts with an account switcher in settings

This commit is contained in:
MineTec committed 2026-09-27 14:54:10 +02:00
1 parent 5e65c4671a
commit 27563a6dc1
33 files changed
+1801 -462

No files matched your search

@@ -1,9 +1,18 @@
enum AccountStatus { undefined, loggedIn, loggedOut }
enum AccountStatus { undefined, loggedIn, loggedOut, addingAccount }
class AccountState {
final AccountStatus status;
const AccountState({this.status = AccountStatus.undefined});
AccountState copyWith({AccountStatus? status}) =>
AccountState(status: status ?? this.status);
/// Active account; the account-scoped part of the app is keyed by it.
final String? accountId;
/// Set when [accountId] came from a login (not a switch), to show the
/// post-login splash.
final bool freshLogin;
const AccountState({
this.status = AccountStatus.undefined,
this.accountId,
this.freshLogin = false,
});
}