Merge pull request #10161 from appwrite/update-dart-flutter

chore: update dart 16.1.0, flutter 17.0.2 and cli 8.2.2
This commit is contained in:
Steven Nguyen 2025-07-18 08:49:34 -07:00 committed by GitHub
commit 5742dad1e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 68 additions and 19 deletions

View file

@ -59,7 +59,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '17.0.1',
'version' => '17.0.2',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@ -217,7 +217,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '8.2.1',
'version' => '8.2.2',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@ -231,6 +231,7 @@ return [
'gitRepoName' => 'sdk-for-cli',
'gitUserName' => 'appwrite',
'gitBranch' => 'dev',
'repoBranch' => 'master',
'exclude' => [
'services' => [
['name' => 'assistant'],
@ -376,7 +377,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '16.0.0',
'version' => '16.1.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,

24
composer.lock generated
View file

@ -3493,16 +3493,16 @@
},
{
"name": "utopia-php/database",
"version": "0.71.9",
"version": "0.71.10",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "eb2f759020bba617e99dd67973a9bd949b47f54e"
"reference": "83278d663f9c63c25a11d9e71c7922da7ec48636"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/eb2f759020bba617e99dd67973a9bd949b47f54e",
"reference": "eb2f759020bba617e99dd67973a9bd949b47f54e",
"url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636",
"reference": "83278d663f9c63c25a11d9e71c7922da7ec48636",
"shasum": ""
},
"require": {
@ -3543,9 +3543,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.71.9"
"source": "https://github.com/utopia-php/database/tree/0.71.10"
},
"time": "2025-07-02T16:37:41+00:00"
"time": "2025-07-18T00:05:55+00:00"
},
{
"name": "utopia-php/detector",
@ -4810,16 +4810,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.41.15",
"version": "0.41.17",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "02a7e0df5a555c7bdfb50cb68db60460afb409e1"
"reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/02a7e0df5a555c7bdfb50cb68db60460afb409e1",
"reference": "02a7e0df5a555c7bdfb50cb68db60460afb409e1",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ef5e9d952032deecffee7f825a941c40ed4c84b8",
"reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8",
"shasum": ""
},
"require": {
@ -4855,9 +4855,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.15"
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.17"
},
"time": "2025-07-16T13:00:21+00:00"
"time": "2025-07-18T08:18:48+00:00"
},
{
"name": "doctrine/annotations",

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
Databases databases = Databases(client);
Document result = await databases.upsertDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
permissions: ["read("any")"], // (optional)
);

View file

@ -10,5 +10,5 @@ Databases databases = Databases(client);
DocumentList result = await databases.upsertDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: [], // (optional)
documents: [],
);

View file

@ -1,5 +1,17 @@
# Change Log
## 8.2.2
* Fix object comparison logic when pushing settings
* Type generation fixes:
* Dart: Fixed import casing to snake_case, removed `extends Document` and hardcoded attributes, removed unnecessary imports
* Java: Fixed indentation to 4 spaces, updated imports to `java.util.Objects`, fixed enum casing in strict mode as per [Oracle official docs](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html)
* Javascript: Updated optional values formatting from `|null` to `| null`
* Kotlin: Fixed indentation to 4 spaces per [Kotlinlang official docs](https://kotlinlang.org/docs/coding-conventions.html#indentation)
* PHP: Fixed indentation to 4 spaces per [PHP Fig official docs](https://www.php-fig.org/psr/psr-2/)
* Swift: Fixed indentation to 4 spaces, improved `decodeIfPresent` usage for optionals, added missing `public` to `init` method
* Typescript: Fixed indentation to 4 spaces per [Typescript coding guidelines](https://github.com/microsoft/TypeScript/wiki/Coding-guidelines)
## 8.2.1
* Added `--with-variables` option to the Sites command for adding/updating environment variables

View file

@ -1,5 +1,13 @@
# Change Log
## 16.1.0
* Add `gif` support to `ImageFormat` enum
* Add support for `dart38` and `flutter332` runtimes
* Add `upsertDocument()` method to Databases service
* Fix `convertTo()` method in `Document` and `Preferences` models to correctly accept `Map<String, dynamic>`
* Fix `upsertDocuments()` method to have `documents` attribute as required parameter
## 16.0.0
* Add `<REGION>` to doc examples due to the new multi region endpoints

View file

@ -1,9 +1,20 @@
# Change Log
## 16.1.1
## 17.0.2
* Add `gif` support to `ImageFormat` enum
* Fix `convertTo()` method in `Document` and `Preferences` models to correctly accept `Map<String, dynamic>`
## 17.0.1
* Fix `devKeys` support by conditionally including credentials during requests
## 17.0.0
* Update `flutter_web_auth_2` dependency to version 4.1.0
* Update `auth.html` example in README.md to align with `flutter_web_auth_2` documentation
* Breaking changes:
* Minimum iOS version supported is now 17.4 due to the updated requirements of `flutter_web_auth_2` version 4.1.0
## 16.1.0

View file

@ -272,6 +272,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
$gitUrl = 'git@github.com:aw-tests/' . $language['gitRepoName'] . '.git';
}
$repoBranch = $language['repoBranch'] ?? 'main';
if ($git && !empty($gitUrl)) {
\exec('rm -rf ' . $target . ' && \
mkdir -p ' . $target . ' && \
@ -279,8 +280,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
git init && \
git remote add origin ' . $gitUrl . ' && \
git fetch origin && \
git checkout main || git checkout -b main && \
git pull origin main && \
git checkout ' . $repoBranch . ' || git checkout -b ' . $repoBranch . ' && \
git pull origin ' . $repoBranch . ' && \
git checkout ' . $gitBranch . ' || git checkout -b ' . $gitBranch . ' && \
git fetch origin ' . $gitBranch . ' || git push -u origin ' . $gitBranch . ' && \
git pull origin ' . $gitBranch . ' && \