搜索插件、代码仓与 APP 分类

插件详情v31.2.0

dart_appwrite

Appwrite 是一个开源的自托管后端服务器,它通过非常简单的 REST API 抽象并简化了复杂且重复的开发任务。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
2.2万
喜欢数
104
Pub 分数
140

安装插件

flutter pub add dart_appwrite

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

dart_appwrite 包是一个 Dart SDK,可与 Appwrite(一个开源后端服务器)无缝集成。它通过提供简洁直观的 API 来处理身份验证、文件存储、数据库等操作,从而简化后端开发,无需管理基础设施。该 SDK 专为跨平台应用设计,支持 Android、iOS、Web、macOS、Windows 和 Linux。SDK 将复杂的任务抽象为简单的方法,使跨平台快速开发成为可能。

适合场景

  • 用户身份验证
  • 文件存储管理
  • 实时数据库操作
  • 跨平台应用后端
  • 无服务器函数集成
  • 推送通知

主要特点

  • 简单的 REST API 包装器
  • 对多平台的支持
  • 内置的认证方法
  • 安全的文件上传和下载
  • 实时数据同步
  • 通过自托管或云 Appwrite 实现轻松设置

适合对象

  • 全栈式 Flutter 开发人员
  • 初创企业构建最小可行产品
  • 需要安全后端服务的团队
  • 跨平台移动和网页应用
  • 开发者避开后端复杂性

使用建议

  • 需要一个 Appwrite 实例(自托管或云服务)
  • 需要网络连接以进行后端调用
  • 认证令牌必须安全地进行管理
  • 受限于 Appwrite 的功能集
  • 取决于 Appwrite 服务器的可用性

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Appwrite Dart SDK

pub package License Version Build Status Twitter Account Discord

This SDK targets Appwrite server version 1.9.x as shipped on Appwrite Cloud. Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from previous releases when APIs differ.

This is the Dart SDK for integrating with Appwrite from your Dart server-side code. If you're looking for the Flutter SDK you should check appwrite/sdk-for-flutter

Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Dart SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to https://appwrite.io/docs

Appwrite

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  dart_appwrite: ^29.0.0

You can install packages from the command line:

dart pub add dart_appwrite

Getting Started

Initialize & Make API Request

Once you add the dependencies, its extremely easy to get started with the SDK; All you need to do is import the package in your code, set your Appwrite credentials, and start making API calls. Below is a simple example:

Client client = Client()
  .setProject('<YOUR_PROJECT_ID>')
  .setKey('<YOUR_API_KEY>');

Users users = Users(client);

User user = await users.create(
  userId: ID.unique(),
  email: 'email@example.com',
  phone: '+123456789',
  password: 'password',
  name: 'Walter O'Brien'
);
Error handling

The Appwrite Dart SDK raises AppwriteException object with message, code and response properties. You can handle any errors by catching AppwriteException and present the message to the user or handle it yourself based on the provided error information. Below is an example.

try {
  User user = await users.create(...);
} on AppwriteException catch(e) {
  // Handle the error
}
Learn more

You can use the following resources to learn more and get help

Contribution

This library is auto-generated by Appwrite custom SDK Generator. To learn more about how you can help us improve this SDK, please check the contribution guide before sending a pull-request.

License

Please see the BSD-3-Clause license file for more information.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。