Merge pull request #39 from mantreshkhurana/Example-App

Update Example App
This commit is contained in:
Prome
2022-12-26 15:08:47 +08:00
committed by GitHub
3 changed files with 16 additions and 4 deletions

View File

@@ -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

View File

@@ -51,6 +51,7 @@ class _MyAppState extends State<MyApp> {
@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<MyApp> {
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');
}
},
),
),

View File

@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
webview_cef: 60cb104c4f5d7454500fa260cfbaeb1da3d45292
webview_cef: 526e35f55e668d1781e81189cfa6a5b498324ca1
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c