feat(app): 班级码验证前后端联调 — AuthBloc接入API + 错误计数锁定UI
This commit is contained in:
@@ -40,21 +40,33 @@ final class Authenticated extends AuthState {
|
||||
/// 是否需要班级码加入(学生/家长角色)
|
||||
final bool needsClassCode;
|
||||
|
||||
/// 是否正在加载(班级码验证中)
|
||||
final bool isLoading;
|
||||
|
||||
/// 班级码验证错误信息
|
||||
final String? classCodeError;
|
||||
|
||||
const Authenticated({
|
||||
required this.user,
|
||||
this.needsRoleSelection = false,
|
||||
this.needsClassCode = false,
|
||||
this.isLoading = false,
|
||||
this.classCodeError,
|
||||
});
|
||||
|
||||
Authenticated copyWith({
|
||||
User? user,
|
||||
bool? needsRoleSelection,
|
||||
bool? needsClassCode,
|
||||
bool? isLoading,
|
||||
String? classCodeError,
|
||||
}) =>
|
||||
Authenticated(
|
||||
user: user ?? this.user,
|
||||
needsRoleSelection: needsRoleSelection ?? this.needsRoleSelection,
|
||||
needsClassCode: needsClassCode ?? this.needsClassCode,
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
classCodeError: classCodeError,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user