Shorebird 联合 Appwrite 实现更新逻辑?

Shorebird 联合 Appwrite 实现更新逻辑?

对于上一篇文章来说,我们讲述了开发了一款插件进行监控下载补丁的进度。

对于插件,我进行了升级。目前已经支持 Appwrite 服务器。

对于 Appwrite 是什么,大家可以前往 appwrite.io 查看。对于 Appwrite 我们可以本地部署和使用 Appwrite 云服务。

对于我们的插件怎么才能将整个链路串起来呢?

创建 Appwrite 存储(按照 Appwrite 云讲述)

上传最新的补丁到 Appwrite

在已经成功接入 Shorebird 服务的工程在 pubspec.yaml 添加如下配置

yaml 复制代码
appwrite:
# host: 这里可以设置自定义服务器地址
  key: xxxxxxx
  projectId: xxxxxxx
  bucketId: xxxxxxx

安装 shorebird_patch_uploader

bash 复制代码
dart pub global active shorebird_download

在工程的目录终端执行下面的命令

bash 复制代码
shorebird_patch_uploader appwrite --platform [ios/android] 

使用 Appwrite 下载补丁

dart 复制代码
final downloader =
    ShorebirdAppwriteDownloader(
      appid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
      projectId: 'xxxxx',
      bucketId: 'bucketId',
      key: 'key',
      // endPoint: 'custom appwrite endpoint normal is https://cloud.appwrite.io/v1'
    );
await downloader.downloadPatch((size,totol) => print("$size/$totol"));
相关推荐
RaidenLiu17 小时前
从 Provider 迈向 Riverpod 3:核心架构与迁移指南
前端·flutter
叽哥17 小时前
Flutter面试:Dart基础2
flutter·面试·dart
tangweiguo0305198720 小时前
Android原生(Kotlin)与Flutter混合开发 - 设备控制与状态同步解决方案
android·flutter
江上清风山间明月2 天前
Flutter AlwaysScrollableScrollPhysics详解
flutter·滚动·scrollable·scrollphysics
普罗米拉稀2 天前
Flutter 复用艺术:Mixin 与 Abstract 的架构哲学与线性化解密
flutter·ios·面试
yangshuo12812 天前
AI编程工具对决:Kilo vs Augment 开发Flutter俄罗斯方块游戏实战对比
flutter·游戏·ai编程
tangweiguo030519872 天前
Flutter 自定义 Switch 切换组件完全指南
flutter
笔沫拾光2 天前
iOS 正式包签名指南
flutter·ios·ios签名
森之鸟3 天前
flutter项目适配鸿蒙
flutter·华为·harmonyos
傅里叶3 天前
Flutter在OrangePi 5 Plus上视频播放锁死问题
前端·flutter