Merge pull request #300 from appwrite/dev

feat: Flutter SDK update for version 21.4.0
This commit is contained in:
Jake Barnby
2026-02-20 01:40:02 +13:00
committed by GitHub
9 changed files with 43 additions and 9 deletions
+9
View File
@@ -1,5 +1,14 @@
# Change Log
## 21.4.0
* Added upsert() to DocumentChannel and RowChannel to support upsert operations on documents and rows.
* Added Query.contains, Query.containsAny, and Query.containsAll for enhanced filtering capabilities.
## 21.3.0
* Added memberships realtime channel helper
## 21.1.0
* Add `queries` parameter to Realtime subscriptions for filtering events
+2 -2
View File
@@ -7,7 +7,7 @@
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
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 Flutter 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](https://appwrite.io/docs)
@@ -19,7 +19,7 @@ Add this to your package's `pubspec.yaml` file:
```yml
dependencies:
appwrite: ^21.3.0
appwrite: ^21.4.0
```
You can install packages from the command line:
+2
View File
@@ -130,6 +130,7 @@ extension BucketChannel on Channel<_Bucket> {
/// Only available on Channel<_Document>
extension DocumentChannel on Channel<_Document> {
Channel<_Resolved> create() => _resolve('create');
Channel<_Resolved> upsert() => _resolve('upsert');
Channel<_Resolved> update() => _resolve('update');
Channel<_Resolved> delete() => _resolve('delete');
}
@@ -137,6 +138,7 @@ extension DocumentChannel on Channel<_Document> {
/// Only available on Channel<_Row>
extension RowChannel on Channel<_Row> {
Channel<_Resolved> create() => _resolve('create');
Channel<_Resolved> upsert() => _resolve('upsert');
Channel<_Resolved> update() => _resolve('update');
Channel<_Resolved> delete() => _resolve('delete');
}
+16 -1
View File
@@ -98,11 +98,26 @@ class Query {
static String endsWith(String attribute, String value) =>
Query._('endsWith', attribute, value).toString();
/// Filter resources where [attribute] contains [value]
/// Filter resources where [attribute] contains [value].
/// For string attributes, checks if the string contains the substring.
/// [value] can be a single value or a list.
///
/// Note: For array attributes, use [containsAny] or [containsAll] instead.
static String contains(String attribute, dynamic value) =>
Query._('contains', attribute, value).toString();
/// Filter resources where [attribute] contains ANY of the specified [value]s.
/// For array and relationship attributes, matches documents where the attribute
/// contains at least one of the given values.
static String containsAny(String attribute, List<dynamic> value) =>
Query._('containsAny', attribute, value).toString();
/// Filter resources where [attribute] contains ALL of the specified [value]s.
/// For array and relationship attributes, matches documents where the attribute
/// contains every one of the given values.
static String containsAll(String attribute, List<dynamic> value) =>
Query._('containsAll', attribute, value).toString();
/// Filter resources where [attribute] does not contain [value]
/// [value] can be a single value or a list.
static String notContains(String attribute, dynamic value) =>
+1 -1
View File
@@ -40,7 +40,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
'x-sdk-name': 'Flutter',
'x-sdk-platform': 'client',
'x-sdk-language': 'flutter',
'x-sdk-version': '21.3.0',
'x-sdk-version': '21.4.0',
'X-Appwrite-Response-Format': '1.8.0',
};
+1 -1
View File
@@ -58,7 +58,7 @@ class ClientIO extends ClientBase with ClientMixin {
'x-sdk-name': 'Flutter',
'x-sdk-platform': 'client',
'x-sdk-language': 'flutter',
'x-sdk-version': '21.3.0',
'x-sdk-version': '21.4.0',
'X-Appwrite-Response-Format': '1.8.0',
};
+1 -3
View File
@@ -39,9 +39,7 @@ enum OAuthProvider {
yammer(value: 'yammer'),
yandex(value: 'yandex'),
zoho(value: 'zoho'),
zoom(value: 'zoom'),
githubImagine(value: 'githubImagine'),
googleImagine(value: 'googleImagine');
zoom(value: 'zoom');
const OAuthProvider({required this.value});
+1 -1
View File
@@ -1,5 +1,5 @@
name: appwrite
version: 21.3.0
version: 21.4.0
description: Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API
homepage: https://appwrite.io
repository: https://github.com/appwrite/sdk-for-flutter
+10
View File
@@ -26,6 +26,16 @@ void main() {
.toString(),
'databases.db1.collections.col1.documents.doc1.create');
});
test('returns database channel with upsert action', () {
expect(
Channel.database('db1')
.collection('col1')
.document('doc1')
.upsert()
.toString(),
'databases.db1.collections.col1.documents.doc1.upsert');
});
});
group('tablesdb()', () {