diff --git a/README.md b/README.md index f2148c1..3265f39 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ When building the project for the first time, a prebuilt cef bin package (200MB, `**[HELP WANTED!]**` Finding a more elegant way to distribute the prebuilt package. -> Note: Currently the project has not been enabled with multi process support due to debug convenience. If you want to enable multi process support, you may want enable multi process mode by changing the implementation and build your own helper bundle. (Finding a more elegant way in the future.) +> Note: Currently the project has not been enabled with multi process support due to debug convenience. If you want to enable multi process support, you may want to enable multi process mode by changing the implementation and build your own helper bundle. (Finding a more elegant way in the future.) ## Todos diff --git a/example/lib/main.dart b/example/lib/main.dart index 5e29bcb..a57625a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -51,6 +51,7 @@ class _MyAppState extends State { @override Widget build(BuildContext context) { return MaterialApp( + debugShowCheckedModeBanner: false, theme: ThemeData(useMaterial3: true), home: Scaffold( body: Column( @@ -101,8 +102,19 @@ class _MyAppState extends State { child: TextField( controller: _textController, onSubmitted: (url) { - _textController.text = url; - _controller.loadUrl(url); + if (url.startsWith('http://')) { + _textController.text = url; + _controller.loadUrl(url); + } else if (url.startsWith('https://')) { + _textController.text = url; + _controller.loadUrl(url); + } else if (url.startsWith('www.')) { + _textController.text = 'https://$url'; + _controller.loadUrl('https://$url'); + } else { + _textController.text = url; + _controller.loadUrl('https://google.com/search?q=$url'); + } }, ), ), diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 8ce359b..deba618 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -15,7 +15,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 - webview_cef: 60cb104c4f5d7454500fa260cfbaeb1da3d45292 + webview_cef: 526e35f55e668d1781e81189cfa6a5b498324ca1 PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c