feat: Flutter SDK update for version 22.0.0#303
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughRequires explicit non-empty IDs for channel factory methods and navigation (database, tablesdb, bucket, execution, function, team, membership, collection, table); _normalize now throws on empty IDs. Adds optional ttl (int?) parameters to Databases.listDocuments and TablesDB.listRows and passes ttl in API params. Updates SDK version strings and pubspec version to 22.0.0. Examples/docs include ttl usage. Tests updated to expect ArgumentError for missing IDs. Removed two version entries from CHANGELOG and minor comment edits for $sequence in models. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
lib/services/databases.dart (1)
128-128: Documentttlsemantics in this API method.Please add a brief note on
ttlunit/range (for example, seconds and accepted values) in the method docs so consumers can use it correctly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/services/databases.dart` at line 128, Update the method documentation for the API method that declares the parameter int? ttl (in lib/services/databases.dart) to clearly state the TTL semantics: specify the unit (e.g., seconds), accepted value range (e.g., non-negative integers, zero meaning immediate expiry or disallowed), behavior when ttl is null (e.g., no expiration), and any maximum allowed value or truncation policy; include this brief note in the method doc comment adjacent to the ttl parameter so callers know how to provide and interpret ttl correctly.test/channel_test.dart (1)
6-8: Add a whitespace-only invalid-ID test case.Since normalization trims IDs, a
' 'case would improve coverage of the real validation behavior (apply similarly across root constructors).🧪 Minimal test addition
test('throws when database id is missing', () { expect(() => Channel.database(''), throwsArgumentError); + expect(() => Channel.database(' '), throwsArgumentError); });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/channel_test.dart` around lines 6 - 8, Add a whitespace-only invalid-ID test: duplicate the existing test that checks Channel.database('') but pass a string of only spaces (e.g., ' ') and assert it throwsArgumentError (expect(() => Channel.database(' '), throwsArgumentError)); also add the same whitespace-only test for the other root constructors mentioned in the codebase (the root constructors such as Channel.collection / Channel.root or any other Channel.* root constructors) to ensure normalization/trimming logic rejects whitespace-only IDs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Line 10: Update the awkward wording in the README sentence that currently
reads "**This SDK is compatible with Appwrite server version latest. For older
versions, please check [previous
releases](https://github.com/appwrite/sdk-for-flutter/releases).**" — change
"version latest" to a clearer phrase such as "the latest version" (e.g., "This
SDK is compatible with the latest Appwrite server version. For older versions,
please check previous releases.") so the compatibility statement is
grammatically correct and unambiguous.
---
Nitpick comments:
In `@lib/services/databases.dart`:
- Line 128: Update the method documentation for the API method that declares the
parameter int? ttl (in lib/services/databases.dart) to clearly state the TTL
semantics: specify the unit (e.g., seconds), accepted value range (e.g.,
non-negative integers, zero meaning immediate expiry or disallowed), behavior
when ttl is null (e.g., no expiration), and any maximum allowed value or
truncation policy; include this brief note in the method doc comment adjacent to
the ttl parameter so callers know how to provide and interpret ttl correctly.
In `@test/channel_test.dart`:
- Around line 6-8: Add a whitespace-only invalid-ID test: duplicate the existing
test that checks Channel.database('') but pass a string of only spaces (e.g., '
') and assert it throwsArgumentError (expect(() => Channel.database(' '),
throwsArgumentError)); also add the same whitespace-only test for the other root
constructors mentioned in the codebase (the root constructors such as
Channel.collection / Channel.root or any other Channel.* root constructors) to
ensure normalization/trimming logic rejects whitespace-only IDs.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
README.mddocs/examples/databases/list-documents.mddocs/examples/tablesdb/list-rows.mdlib/channel.dartlib/services/databases.dartlib/services/tables_db.dartlib/src/client_browser.dartlib/src/client_io.dartlib/src/models/document.dartlib/src/models/row.dartpubspec.yamltest/channel_test.dart
| [](https://appwrite.io/discord) | ||
|
|
||
| **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).** | ||
| **This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).** |
There was a problem hiding this comment.
Fix compatibility sentence wording for clarity.
The phrase “version latest” is awkward and can confuse readers.
✏️ Suggested wording fix
-**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 the latest Appwrite server version. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| **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 the latest Appwrite server version. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).** |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 10, Update the awkward wording in the README sentence that
currently reads "**This SDK is compatible with Appwrite server version latest.
For older versions, please check [previous
releases](https://github.com/appwrite/sdk-for-flutter/releases).**" — change
"version latest" to a clearer phrase such as "the latest version" (e.g., "This
SDK is compatible with the latest Appwrite server version. For older versions,
please check previous releases.") so the compatibility statement is
grammatically correct and unambiguous.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
README.md (1)
10-10:⚠️ Potential issue | 🟡 MinorCompatibility sentence wording is still awkward.
Line 10 still uses “version latest”, which is grammatically unclear. This was already raised earlier and remains unresolved.
✏️ Suggested wording fix
-**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 the latest Appwrite server version. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` at line 10, The compatibility sentence in the README uses awkward wording "version latest"; update that sentence (the line containing "**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**") to read clearly, e.g. "This SDK is compatible with the latest Appwrite server version. For older versions, please check previous releases." or similar, ensuring "latest" precedes "version" or using "the latest Appwrite server version."
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@README.md`:
- Line 10: The compatibility sentence in the README uses awkward wording
"version latest"; update that sentence (the line containing "**This SDK is
compatible with Appwrite server version latest. For older versions, please check
[previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**")
to read clearly, e.g. "This SDK is compatible with the latest Appwrite server
version. For older versions, please check previous releases." or similar,
ensuring "latest" precedes "version" or using "the latest Appwrite server
version."
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
CHANGELOG.mdREADME.mdlib/src/client_browser.dartlib/src/client_io.dartpubspec.yaml
💤 Files with no reviewable changes (1)
- CHANGELOG.md
✅ Files skipped from review due to trivial changes (1)
- pubspec.yaml
This PR contains updates to the Flutter SDK for version 22.0.0.