enum AccountStatus { undefined, loggedIn, loggedOut } class AccountState { final AccountStatus status; const AccountState({this.status = AccountStatus.undefined}); AccountState copyWith({AccountStatus? status}) => AccountState(status: status ?? this.status); }