Skip to content

feat: Flutter SDK update for version 28.0.0 - #341

Merged
ChiragAgg5k merged 11 commits into
mainfrom
dev
Oct 15, 2026
Merged

ChiragAgg5k merged 11 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 28.0.0.

What's Changed

  • Breaking: requests send X-Appwrite-Response-Format: 2.5.0; responses follow the 2.5 shapes
  • Breaking: missing response fields are filled with their documented defaults
  • Breaking: Client.chunkedUpload takes a responseType parameter; custom Client implementations must add it
  • Breaking: requires Dart >=3.10.0 and Flutter >=3.38.1
  • Breaking: the package is now a Flutter plugin with native Android push code
  • Breaking: Client adds setPushEndpoint, setPushClientId and flatten; custom Client implementations must add them
  • Added: Apps service to manage apps, installations, keys and secrets
  • Added: Oauth2 service for the OAuth2 authorize, token, device and grant flows
  • Added: Push service with background delivery on Android
  • Added: Topic helper and MQTT exports
  • Added: Android push code ships under io.appwrite.flutter, so apps can also depend on sdk-for-android; set the notification icon with the io.appwrite.flutter.push.notification_icon meta-data
  • Added: Query aggregates (count, countDistinct, sum, avg, min, max and more), groupBy, having, distinct, joins, relationship, covers, spatialEquals and page
  • Added: Query.builder() to chain queries; build() returns the query list
  • Added: ExecutionTrigger.email
  • Fixed: required map fields missing from a response, such as prefs, default to an empty map
  • Fixed: OAuth2 models wrap a single prompt value in a list

Also in this diff

main was behind the release tags, which were cut from release branches. This PR brings it up to date, so the diff also contains these already-released versions:

27.1.0

  • Added: account passkey methods listPasskeys, createPasskey, getPasskey, updatePasskey, deletePasskey and updatePasskeyVerification
  • Added: account.createPasskeyToken and account.updatePasskeyToken for passkey sign-in
  • Added: Passkey, PasskeyList, PasskeyChallenge and TokenSecret models

27.2.0

  • Added: analytics.createEvent in a new Analytics service to send tracking events
  • Added: Tracking helper for app lifecycle events and screen views, and TrackingObserver for automatic route tracking
  • Added: avatars.updatePhoto and avatars.deletePhoto to manage the user's custom profile photo, and the Account model
  • Added: Webflow to the OAuthProvider enum
  • Added: optional state on account.createOAuth2Session and account.createOAuth2Token, returned unchanged on the success and failure URLs
  • Added: optional duration on account.createEmailPasswordSession to set the session length
  • Added: optional current on account.deleteSessions to keep the current session signed in
  • Added: optional membershipId on teams.createMembership
  • Added: optional total on account.listSessions, the locale list methods and listTransactions

@ChiragAgg5k ChiragAgg5k changed the title feat: Flutter SDK update for version 28.0.0 feat: SDK update for version 28.0.0 Oct 14, 2026
@hansi-codes

hansi-codes Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

Limited by an open minor finding: Flatten nested query lists recursively

This update brings the Flutter SDK to 28.0.0 with Appwrite 2.5 response handling, expanded query APIs, and new Apps, OAuth2, passkey, analytics, and push capabilities. It also adds Android push integration and refreshes the package documentation and examples.

17 of 142 changed files were too large to include in full.

Verdict New comments Fixed Still open
💬 Commented 0 0 1

Note

Not approving while a bug finding is open: Parse the OAuth2 grant prompt using the 2.5 response shape

Fix with agent prompt
### Issue 1
lib/src/client_mixin.dart:172-178
**Flatten nested query lists recursively**

Only direct `QueryBuilder` elements are expanded here. A nested list such as `[Query.builder().equal('x', 1).build()]` passes through unchanged, so `Client.flatten` and request preparation leave `queries` nested instead of producing the flat query-string list promised by the new API; GET requests then serialize the inner list as one value.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
📂 Walkthrough · 8
File Change
CHANGELOG.md, README.md, docs/examples/**, example/README.md Update version notes, usage guidance, and examples for the new SDK APIs and push behavior.
android/** Move the Android push implementation into the Flutter package namespace and extend notification and background-status handling.
lib/query.dart, lib/query/builder.dart Add query aggregates, joins, spatial filters, pagination, and a fluent query builder.
lib/services/** Add Apps, OAuth2, and Analytics APIs, passkey account methods, and new optional request parameters.
lib/src/client*.dart, lib/src/client_mixin.dart Update request metadata and add query-builder flattening and response-type support.
lib/src/models/**, lib/models.dart, lib/src/enums/** Add OAuth2, app, and passkey models, response defaults, and the email execution trigger.
lib/src/mqtt*.dart, lib/src/tracking*.dart, lib/src/realtime*.dart, lib/topic.dart, lib/appwrite.dart Add tracking and topic exports and update push notification, status, and realtime support.
pubspec.yaml, test/** Configure the Flutter plugin and update tests for query, passkey, push, and topic behavior.
⏳ Still open from earlier reviews · 1

Reviewed 8df41c2 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Tier A · See the inline comments. Summary

Comment thread lib/src/models/account.dart
@ChiragAgg5k ChiragAgg5k changed the title feat: SDK update for version 28.0.0 feat: Flutter SDK update for version 28.0.0 Oct 14, 2026
@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Tier A · See the inline comments. Summary

Comment thread lib/src/client_mixin.dart
Comment on lines +172 to +178
if (value is! List || !value.any((item) => item is QueryBuilder)) {
return value;
}
return [
for (final item in value)
if (item is QueryBuilder) ...item.build() else item,
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flatten nested query lists recursively

Only direct QueryBuilder elements are expanded here. A nested list such as [Query.builder().equal('x', 1).build()] passes through unchanged, so Client.flatten and request preparation leave queries nested instead of producing the flat query-string list promised by the new API; GET requests then serialize the inner list as one value.

Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/src/client_mixin.dart
Line: 172-178

Comment:
**Flatten nested query lists recursively**

Only direct `QueryBuilder` elements are expanded here. A nested list such as `[Query.builder().equal('x', 1).build()]` passes through unchanged, so `Client.flatten` and request preparation leave `queries` nested instead of producing the flat query-string list promised by the new API; GET requests then serialize the inner list as one value.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

🟡 Minor · bug · Reply if this doesn't apply.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing this one. Every generated method types queries as List<String>? (realtime too), so [builder.build()] (a List<List<String>>) does not compile against any of them; a builder only reaches _flattenValue through a hand-built client.call params map. Flattening nested lists recursively would also flatten nested values that must stay nested, such as geometry coordinates.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated service signatures do rule out passing a nested list to listDocuments(queries:). But the reported path is still reachable: public Client.call accepts Map<String, dynamic>, and its implementations pass those params through prepareRequest (Client.call, request preparation). For example, params: {'queries': [Query.builder().equal('x', 1).build()]} reaches _flattenValue; because the inner list contains no QueryBuilder directly, it is returned unchanged (flattening logic). The GET path then passes that nested value to URI query construction (GET handling).

The public flatten method also explicitly documents support for “nested query-string lists” (Client.flatten). Flattening arbitrary nested values could indeed break geometry coordinates, but that doesn’t resolve the query-list case; the flattening should preserve unrelated nested values.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Tier B · See the inline comments. Summary

@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Tier A · See the inline comments. Summary

Comment thread lib/src/client_browser.dart
@ChiragAgg5k
ChiragAgg5k merged commit bc04fe6 into main Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants