no message

This commit is contained in:
1147192855@qq.com 2024-06-13 17:23:07 +08:00
parent c75f0f191c
commit e05d7c4395
1 changed files with 4 additions and 7 deletions

View File

@ -120,9 +120,9 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
// //
void getSchoolData(String loginName) async { void getSchoolData(String loginName) async {
var _client = await getClient();
if (loginName.length != 0) { if (loginName.length != 0) {
try { try {
var _client = await getClient();
var res = await _client.toLoginGetSchools(loginName); var res = await _client.toLoginGetSchools(loginName);
if (res.success) { if (res.success) {
schools = res.data ?? []; schools = res.data ?? [];
@ -344,9 +344,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
spreadRadius: 0.5, // spreadRadius: 0.5, //
) )
], ],
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(Radius.circular(8.w)),
Radius.circular(8.w),
),
), ),
alignment: Alignment.center, alignment: Alignment.center,
width: double.infinity, width: double.infinity,
@ -430,14 +428,13 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
void toLogin() async { void toLogin() async {
if (!canLogin) return; if (!canLogin) return;
setState(() => canLogin = false);
void toMsg(msg) { void toMsg(msg) {
ToastUtils.showError(msg); Future.delayed(Duration.zero, () => ToastUtils.showError(msg));
setState(() => canLogin = true); setState(() => canLogin = true);
} }
try { try {
setState(() => canLogin = false);
FocusScope.of(context).requestFocus(_theFocus); FocusScope.of(context).requestFocus(_theFocus);
if (!readAgreement) { if (!readAgreement) {
var resFlag = await showDialog<bool>( var resFlag = await showDialog<bool>(