Commit b0ebbacd by tanghuan

账号与安全中提示绑定孩子信息

1 parent 6cfc527e
......@@ -12,9 +12,13 @@ class AccountState extends Equatable {
final String nickname;
final String imgIcon;
// 孩子信息
final String className;
final String stuName;
// 是否绑定孩子
final bool bindStu;
const AccountState({
this.loaded = false,
this.name = '',
......@@ -23,7 +27,7 @@ class AccountState extends Equatable {
this.imgIcon = '',
this.className = '',
this.stuName = '',
this.bindStu = true,
});
AccountState copyWith({
......@@ -34,6 +38,7 @@ class AccountState extends Equatable {
String? imgIcon,
String? className,
String? stuName,
bool? bindStu,
}) {
return AccountState(
loaded: loaded ?? this.loaded,
......@@ -43,6 +48,7 @@ class AccountState extends Equatable {
imgIcon: imgIcon ?? this.imgIcon,
className: className ?? this.className,
stuName: stuName ?? this.stuName,
bindStu: bindStu ?? this.bindStu,
);
}
......@@ -55,6 +61,7 @@ class AccountState extends Equatable {
imgIcon,
className,
stuName,
bindStu,
];
}
......@@ -76,6 +83,7 @@ class AccountCubit extends Cubit<AccountState> {
var code = result['code'];
var data = result['data'];
if (code != 0) {
emit(state.copyWith(loaded: true, bindStu: false));
return;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!