opt: fullscreen dialog (#2385)

This commit is contained in:
My-Responsitories
2026-06-11 11:03:47 +00:00
committed by GitHub
parent ea5d7593ff
commit 1c5aa2be40

View File

@@ -202,13 +202,9 @@ class _GeetestWebviewDialogState extends State<GeetestWebviewDialog> {
); );
} }
return AlertDialog( return Stack(
title: const Text('验证码'), children: [
contentPadding: const .symmetric(vertical: 16), InAppWebView(
content: SizedBox(
width: 320,
height: 400,
child: InAppWebView(
webViewEnvironment: webViewEnvironment, webViewEnvironment: webViewEnvironment,
initialSettings: InAppWebViewSettings( initialSettings: InAppWebViewSettings(
clearCache: true, clearCache: true,
@@ -239,6 +235,8 @@ class _GeetestWebviewDialogState extends State<GeetestWebviewDialog> {
horizontalScrollBarEnabled: false, horizontalScrollBarEnabled: false,
verticalScrollBarEnabled: false, verticalScrollBarEnabled: false,
overScrollMode: .NEVER, overScrollMode: .NEVER,
pageZoom: Platform.isIOS ? 3 : 1,
), ),
initialData: InAppWebViewInitialData( initialData: InAppWebViewInitialData(
data: data:
@@ -280,13 +278,13 @@ class _GeetestWebviewDialogState extends State<GeetestWebviewDialog> {
} }
}, },
), ),
), Positioned(
actions: [ left: 8,
TextButton( top: 8,
onPressed: Get.back, child: IconButton(
child: Text( icon: const Icon(Icons.close),
'取消', onPressed: Get.back,
style: TextStyle(color: ColorScheme.of(context).outline), tooltip: '关闭',
), ),
), ),
], ],