From 1c5aa2be401ae6a953e422a91e0c280b4f620029 Mon Sep 17 00:00:00 2001 From: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com> Date: Thu, 11 Jun 2026 11:03:47 +0000 Subject: [PATCH] opt: fullscreen dialog (#2385) --- .../login/geetest/geetest_webview_dialog.dart | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lib/pages/login/geetest/geetest_webview_dialog.dart b/lib/pages/login/geetest/geetest_webview_dialog.dart index c2c5c4840..42feb2fb5 100644 --- a/lib/pages/login/geetest/geetest_webview_dialog.dart +++ b/lib/pages/login/geetest/geetest_webview_dialog.dart @@ -202,13 +202,9 @@ class _GeetestWebviewDialogState extends State { ); } - return AlertDialog( - title: const Text('验证码'), - contentPadding: const .symmetric(vertical: 16), - content: SizedBox( - width: 320, - height: 400, - child: InAppWebView( + return Stack( + children: [ + InAppWebView( webViewEnvironment: webViewEnvironment, initialSettings: InAppWebViewSettings( clearCache: true, @@ -239,6 +235,8 @@ class _GeetestWebviewDialogState extends State { horizontalScrollBarEnabled: false, verticalScrollBarEnabled: false, overScrollMode: .NEVER, + + pageZoom: Platform.isIOS ? 3 : 1, ), initialData: InAppWebViewInitialData( data: @@ -280,13 +278,13 @@ class _GeetestWebviewDialogState extends State { } }, ), - ), - actions: [ - TextButton( - onPressed: Get.back, - child: Text( - '取消', - style: TextStyle(color: ColorScheme.of(context).outline), + Positioned( + left: 8, + top: 8, + child: IconButton( + icon: const Icon(Icons.close), + onPressed: Get.back, + tooltip: '关闭', ), ), ],