added support for multiple accounts, guardian login bugfixes, ui changes
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user