diff --git a/flutter/lib/common/widgets/login.dart b/flutter/lib/common/widgets/login.dart index 16f3b44ed..7fefa49b4 100644 --- a/flutter/lib/common/widgets/login.dart +++ b/flutter/lib/common/widgets/login.dart @@ -434,8 +434,17 @@ Future loginDialog() async { } break; case HttpType.kAuthResTypeEmailCheck: - close(true); - verificationCodeDialog(resp.user); + if (isMobile) { + close(true); + verificationCodeDialog(resp.user); + } else { + setState(() => isInProgress = false); + final res = await verificationCodeDialog(resp.user); + if (res == true) { + close(true); + return; + } + } break; default: passwordMsg = "Failed, bad response from server"; @@ -508,7 +517,11 @@ Future loginDialog() async { size: 25, // No need to handle the branch of null. // Because we can ensure the color is not null when debug. - color: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.55), + color: Theme.of(context) + .textTheme + .titleLarge + ?.color + ?.withOpacity(0.55), ), onTap: onDialogCancel, hoverColor: Colors.red,