We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When used with the window_manager plugin, there is still an issue where the webview area blocks mouse and desktop interaction
The webview area does not affect the interaction between the mouse and desktop
import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:test_web/window_manager.dart'; import 'package:window_manager/window_manager.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await windowManager.ensureInitialized(); WindowOptions windowOptions = const WindowOptions( size: Size(800, 600), center: true, backgroundColor: Colors.transparent, skipTaskbar: false, titleBarStyle: TitleBarStyle.hidden, windowButtonVisibility: false, ); windowManager.waitUntilReadyToShow(windowOptions, () async { await windowManager.show(); await windowManager.focus(); }); runApp(const MyApp()); } class MyApp extends StatefulWidget { const MyApp({super.key}); @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { ThemeMode _themeMode = ThemeMode.light; InAppWebViewController? webViewController; String url = ""; double progress = 0; final urlController = TextEditingController(); @override void initState() { super.initState(); } @override void dispose() { super.dispose(); } @override Widget build(BuildContext context) { final virtualWindowFrameBuilder = VirtualWindowFrameInit(); return MaterialApp( debugShowCheckedModeBanner: false, themeMode: _themeMode, builder: (context, child) { child = virtualWindowFrameBuilder(context, child); return child; }, home: Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(40), child: SizedBox( width: 1060, child: Row( children: [ const Expanded( child: DragWindow(), ), /// 右上角按钮 Row(children: [ IconButton( onPressed: () async { await windowManager.minimize(); }, icon: const Icon(Icons.remove)), IconButton( onPressed: () async { await windowManager.close(); }, icon: const Icon(Icons.close)), ]) ], ), )), body: SafeArea( child: Column(children: <Widget>[ TextField( decoration: const InputDecoration(prefixIcon: Icon(Icons.search)), controller: urlController, keyboardType: TextInputType.url, onSubmitted: (value) { var url = WebUri(value); if (url.scheme.isEmpty) { url = WebUri("https://www.google.com/search?q=$value"); } webViewController?.loadUrl(urlRequest: URLRequest(url: url)); }, ), Expanded( child: Stack( children: [ InAppWebView( initialUrlRequest: URLRequest(url: WebUri("https://inappwebview.dev/")), onWebViewCreated: (controller) { webViewController = controller; }, onLoadStart: (controller, url) { setState(() { this.url = url.toString(); urlController.text = this.url; }); }, ), progress < 1.0 ? LinearProgressIndicator(value: progress) : Container(), ], ), ), ButtonBar( alignment: MainAxisAlignment.center, children: <Widget>[ ElevatedButton( child: const Icon(Icons.arrow_back), onPressed: () { webViewController?.goBack(); }, ), ElevatedButton( child: const Icon(Icons.arrow_forward), onPressed: () { webViewController?.goForward(); }, ), ElevatedButton( child: const Icon(Icons.refresh), onPressed: () { webViewController?.reload(); }, ), ], ), ])), )); } } //拖动窗口 class DragWindow extends StatelessWidget { const DragWindow({super.key}); @override Widget build(BuildContext context) { return SizedBox( child: Listener( onPointerDown: (event) async { await windowManager.startDragging(); }, child: Container( color: Colors.transparent, ), ), ); } }
<Replace this line by pasting your stacktrace or logs here>
v3.24.3
Windows 11
^6.2.0-beta.2
window_manager: ^0.4.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing issue for this?
Current Behavior
When used with the window_manager plugin, there is still an issue where the webview area blocks mouse and desktop interaction
Expected Behavior
The webview area does not affect the interaction between the mouse and desktop
Steps with code example to reproduce
Steps with code example to reproduce
Stacktrace/Logs
Stacktrace/Logs
Flutter version
v3.24.3
Operating System, Device-specific and/or Tool
Windows 11
Plugin version
^6.2.0-beta.2
Additional information
window_manager: ^0.4.3
Self grab
The text was updated successfully, but these errors were encountered: