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"));
相关推荐
MakeZero4 小时前
Flutter那些事-GridView
flutter·dart
Gorit14 小时前
使用 AI + Flutter-OH 开发 HarmonyOS 应用
人工智能·flutter·harmonyos
啥都想学点14 小时前
从 Flutter 前端到 Spring Boot 后端:2026 年技术栈落地路线图(实战版)
前端·spring boot·flutter
西西学代码1 天前
Flutter---回调函数
开发语言·javascript·flutter
圣光SG1 天前
Vue.js 从入门到精通:技术成长之路
flutter
恋猫de小郭1 天前
Swift 6.3 正式发布支持 Android ,它能在跨平台发挥什么优势?
android·前端·flutter
i-阿松!2 天前
PCB板子+ flutter前端 + go后端
物联网·flutter·pcb工艺·go1.19
恋猫de小郭2 天前
Flutter 3.41.6 版本很重要,你大概率需要更新一下
android·前端·flutter
亚历克斯神2 天前
Flutter for OpenHarmony: Flutter 三方库 mutex 为鸿蒙异步任务提供可靠的临界资源互斥锁(并发安全基石)
android·数据库·安全·flutter·华为·harmonyos