mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-08 10:07:51 -06:00
20 lines
619 B
Dart
20 lines
619 B
Dart
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,
|
|
}) = _Authenticated;
|
|
const factory AuthenticationState.switchingAccounts() = _SwitchingAccounts;
|
|
|
|
bool get isAuthenticated => maybeWhen(
|
|
authenticated: (_) => true,
|
|
orElse: () => false,
|
|
);
|
|
}
|