auth_state.dart 520 B

12345678910111213
  1. import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart'
  2. show UserProfilePB;
  3. import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
  4. import 'package:freezed_annotation/freezed_annotation.dart';
  5. part 'auth_state.freezed.dart';
  6. @freezed
  7. class AuthState with _$AuthState {
  8. const factory AuthState.authenticated(UserProfilePB userProfile) =
  9. Authenticated;
  10. const factory AuthState.unauthenticated(FlowyError error) = Unauthenticated;
  11. const factory AuthState.initial() = _Initial;
  12. }