AppFlowy/frontend/appflowy_flutter/lib/user/domain/auth_state.dart

14 lines
520 B
Dart
Raw Normal View History

import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart'
show UserProfilePB;
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
2021-06-19 15:41:19 +00:00
import 'package:freezed_annotation/freezed_annotation.dart';
part 'auth_state.freezed.dart';
@freezed
2022-03-25 07:02:43 +00:00
class AuthState with _$AuthState {
const factory AuthState.authenticated(UserProfilePB userProfile) =
Authenticated;
2021-12-14 10:04:51 +00:00
const factory AuthState.unauthenticated(FlowyError error) = Unauthenticated;
2021-07-12 15:27:58 +00:00
const factory AuthState.initial() = _Initial;
2021-06-19 15:41:19 +00:00
}