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"));
相关推荐
QuantumLeap丶1 小时前
《Flutter全栈开发实战指南:从零到高级》- 05 - 基础组件实战:构建登录界面
flutter·ios
黄毛火烧雪下1 小时前
(四)Flutter插件之IOS插件开发
flutter·ios
西西学代码2 小时前
Flutter---弹窗
flutter
RaidenLiu2 小时前
告别陷阱:精通Flutter Signals的生命周期、高级API与调试之道
前端·flutter·前端框架
—Qeyser4 小时前
Flutter字体引用与使用指南
flutter
I烟雨云渊T5 小时前
iOS原生与Flutter的交互编程
flutter·ios·交互
恋猫de小郭8 小时前
第一台 Andriod XR 设备发布,Jetpack Compose XR 有什么不同?对原生开发有何影响?
android·前端·flutter
未来猫咪花9 小时前
对 signals.dart 细粒度更新的误解
flutter
—Qeyser1 天前
使用 Flutter 的 Positioned 控件实现精准布局
flutter
weixin_404611341 天前
鸿蒙flutter 老项目到新项目的遇到迁移坑点
flutter·华为·harmonyos