auth_state.dart 496 B

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