feat: Migrate to go_router

This commit is contained in:
Anton Stubenbord
2023-07-30 23:51:00 +02:00
parent 61336d9527
commit f1398e6d4c
78 changed files with 2206 additions and 1756 deletions

View File

@@ -2,12 +2,18 @@ part of 'authentication_cubit.dart';
@freezed
class AuthenticationState with _$AuthenticationState {
const AuthenticationState._();
const factory AuthenticationState.unauthenticated() = _Unauthenticated;
const factory AuthenticationState.requriresLocalAuthentication() =
_RequiresLocalAuthentication;
const factory AuthenticationState.authenticated({
required String localUserId,
required int apiVersion,
}) = _Authenticated;
const factory AuthenticationState.switchingAccounts() = _SwitchingAccounts;
bool get isAuthenticated => maybeWhen(
authenticated: (_) => true,
orElse: () => false,
);
}