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"));
相关推荐
GitLqr11 小时前
玩转 Flutter 项目依赖:从 pubspec.yaml 到实战包管理
flutter·面试·全栈
程序员老刘17 小时前
Qwen 3.8 max干了20分钟没干完,免费模型3分17秒搞定,问题出在哪?
flutter·ai编程
飞凌嵌入式20 小时前
告别多端重复开发:Buildroot+Flutter实现全平台UI风格统一
flutter·ui
FungLeo20 小时前
Flutter 带 TTL 的多级缓存设计:内存+磁盘+网络三层实战
网络·flutter·缓存·性能优化
FungLeo21 小时前
Flutter 可复用公共组件库设计与落地:AppDialog/BottomSheet 等实战
flutter
Fungleo1069971 天前
Flutter/Android Release 包连不上网?AndroidManifest INTERNET 权限排查实录
flutter
GitLqr2 天前
Flutter 实战:为你的 App 增加桌面快捷方式 (Quick Actions)
flutter·app·全栈
FungLeo2 天前
Flutter 把第三方 UI 库渐进迁回 Material 3:组件映射总表 + 四批次替换实战
flutter·ui
GitLqr3 天前
iOS 27 强制要求 UISceneDelegate:UIKit 和 Flutter 开发者该如何应对?
flutter·ios·全栈
蜡台3 天前
Flutter HTTP 请求完整详解
网络协议·flutter·http·dart