天气应用

一个完整、简单的天气应用程序。

A-complete-simple-weather-application.

入门

获取您自己的API密钥

Google Cloud API密钥设置
  • 转到 Google Developers Console。
  • 创建新项目。
  • 从左侧菜单,转到 Credentials(凭据)部分;点击 Create Credentials(创建凭据)并生成 API KEY。
  • 复制项目的 API KEY。
  • 再次从左侧菜单,转到 Library(库)部分;搜索 Places API 并启用它。

创建完密钥后,
将其放在正确的位置

在文件 services/wather.dart 的顶部,放入 open weathe map 密钥和 aqicn。

在文件 screens/location_screen.dart 中,放入 google api 密钥(搜索 'Your_api_key')。



您可以更改语言和搜索地点

 language: "en",

 components: [Component(Component.country, "il")]);



这是我的第一个应用,显然有些地方可以做得更好。

设计的灵感来自:小米天气

GitHub

https://github.com/Yoad-Duani/Weather_app_flutter