步骤 1.准备开发环境
Flutter ThingsBoard 移动应用程序需要 2.12.0 及以上版本的 Flutter SDK。 请按照这些说明设置 Flutter SDK。 为了获得更好的体验,我们建议按照这些说明设置编辑器。
Flutter ThingsBoard 移动应用程序由 ThingsBoard 平台从 3.4.0 版本开始提供服务。 您需要启动并运行 ThingsBoard 服务器。最简单的方法是使用 Live Demo。 另一种选择是使用 Installation Guide 安装 ThingsBoard。
步骤 2。获取应用源代码
Flutter ThingsBoard 移动应用程序兼容性表
根据 ThingsBoard 的版本确定 Flutter ThingsBoard 移动应用程序的版本。
ThingsBoard 版本 | Flutter ThingsBoard 移动应用程序 | Dart ThingsBoard 客户端 |
3.9.0 | 1.5.0 | 3.0.0 |
3.8.1 | 1.4.0 | 2.0.0 |
3.8.0+ | 1.3.0 | 1.3.0 |
3.6.3+ | 1.1.0 | 1.1.0 |
3.6.2+ | 1.0.8 | 1.0.8 |
3.6.0+ | 1.0.7 | 1.0.7 |
3.5.0+ | 1.0.6 | 1.0.6 |
3.4.2+ | 1.0.4 | 1.0.4 |
3.4.0+ | 1.0.3 | 1.0.3 |
你可以从 github 仓库克隆 Flutter ThingsBoard 移动应用程序源代码:
|
步骤 3。配置 ThingsBoard API 端点
在编辑器/IDE 中打开flutter_thingsboard_app项目。编辑 lib/constants/app_constants.dart。
1)配置端口
- 如果是 Live Demo,请将其设置为 。
https://demo.thingsboard.
abstract class ThingsboardAppConstants {
static const thingsBoardApiEndpoint = 'https://demo.thingsboard.io';
...
}
使用实际连接的以太网地址