dart - Flutter 中的 Google 搜索
问题描述
是否有任何插件或可能性在颤振应用程序中添加谷歌搜索?将有一个带有文本的按钮。如果用户单击该按钮,它将获取该文本并转到浏览器并在谷歌中搜索。在html中是这样的:
<form method="get" action="http://www.google.com/search">
<div style="border:1px solid black;padding:4px;width:20em;"> <table border="0" cellpadding="0">
<tr>
<td>
<input type="text" name="q" size="25" maxlength="255" value="" />
<input type="submit" value="Google Search" />
</td>
</tr>
</table>
</div>
</form>
如何在颤振中实现这一点?
解决方案
使用url_launcher插件。要搜索特定事物,请将查询参数附加到 google url,例如:https://www.google.com/search?q=query+goes+here
推荐阅读
- node.js - windows build tool 安装卡住,更多信息向下
- node.js - 从 Phoenix / Elixir GET 函数中调用 Typescript 函数
- ruby - Ruby 中的价值案例
- javascript - JavaScript 在其他地方运行,但不在 MediaWiki:common.js 中
- android-jetpack-compose - Jetpack Compose:在 if 语句中“记住”?
- python - Pandas DataFrame 中的数据透视表 - 将行变为列
- flutter - 将多个图像的异步图像上传到firebase存储
- sql - Postgis 触发器:表和物化视图
- python - 用 loc pandas 替换行
- java - PHP <-> Java Socket 随机空包 [已解决]