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"));
相关推荐
●VON35 分钟前
AtomGit Flutter鸿蒙客户端:文件树与代码浏览
android·服务器·安全·flutter·harmonyos·鸿蒙
911hzh13 小时前
Flutter Plugin 开发教程:从零创建原生插件到发布 pub.dev 完整流程
flutter
我有满天星辰19 小时前
【Dart 语言学习教程 】 第二章:面向对象编程
学习·flutter·dart
●VON19 小时前
AtomGit Flutter鸿蒙客户端:API客户端与网络层
flutter·华为·架构·跨平台·harmonyos·鸿蒙
核电机组20 小时前
IOS原生APP集成Flutter
flutter·ios
唔6620 小时前
在 Flutter 混合开发中,Android 原生层通知 Dart 界面更新状态
android·flutter
小书房20 小时前
移动开发跨平台方案之RN/Flutter/KMP/CMP
flutter·react native·react·跨平台·rn·kmp·cmp
●VON21 小时前
AtomGit Flutter鸿蒙客户端:安全JSON解析
安全·flutter·华为·json·harmonyos·鸿蒙
●VON21 小时前
AtomGit Flutter鸿蒙客户端:项目架构概览
flutter·华为·架构·harmonyos·鸿蒙