【问题标题】:Google Search in FlutterFlutter 中的 Google 搜索
【发布时间】:2018-09-07 16:23:33
【问题描述】:

是否有任何插件或可能性可以在 Flutter 应用中添加谷歌搜索?将有一个带有文本的按钮。如果用户单击该按钮,它将获取该文本并转到浏览器并在谷歌中搜索。在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>

如何在flutter中实现这一点?

【问题讨论】:

    标签: dart flutter


    【解决方案1】:

    使用url_launcher 插件。要搜索特定事物,请将 query parameter 附加到 google url,例如:https://www.google.com/search?q=query+goes+here

    【讨论】:

      猜你喜欢
      • 2020-08-07
      • 2020-07-16
      • 1970-01-01
      • 2021-02-13
      • 1970-01-01
      • 2020-11-17
      • 1970-01-01
      • 2018-11-07
      • 2017-07-25
      相关资源
      最近更新 更多