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