Skip to content

feat: Flutter SDK update for version 27.1.0-rc.8 - #337

Merged
lohanidamodar merged 1 commit into
mainfrom
dev
Oct 8, 2026
Merged

lohanidamodar merged 1 commit into
mainfrom
dev

Conversation

@lohanidamodar

Copy link
Copy Markdown
Member

Generated with sdk-generator 5.5.4.

What's Changed

  • Added: Analytics service, the Tracking helper and TrackingObserver, which were missing from 27.1.0-rc.5 through rc.7
  • Changed: Tracking takes the Analytics service and a property id instead of an emitter callback
  • Changed: enableAllAutoTracking() is now start()
  • Fixed: engagement time is no longer discarded when the app returns from inactive without backgrounding
  • Fixed: a rejected tracking request no longer surfaces as an unhandled async error
  • Fixed: removing a buried route no longer records a screen view for a screen that was never visible

The three fixes address the review findings on #336.

Why analytics went missing

The analytics surface dropped out of 27.1.0-rc.5 through rc.7 because it only existed on short-lived RC branches that were never merged, so anything cut from main lost it. Going through dev → main is what stops that recurring.

Verification

Against a real Flutter toolchain: dart analyze lib reports zero error-level issues, and flutter pub publish --dry-run reports only the two pre-existing warnings (the docs/ → doc/ layout convention and the snake_case oauth2_* model fields), both of which the published 27.1.0-rc.4 also had.

No deletions.

Breaking only for the 27.1.0-rc.* prereleases that ship the old AnalyticsTracking; stable (27.0.0) is unaffected.

@hansi-codes

hansi-codes Bot commented Oct 8, 2026

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

The submitted findings are minor documentation and test-quality issues; the new service and tracking functionality otherwise appears consistent with the surrounding SDK patterns.

This release adds the Analytics service and Flutter tracking helpers, including lifecycle and route-based event tracking, and adds OAuth2 state support. It also updates package and SDK version references for 27.1.0-rc.8 and adds analytics usage documentation.

Verdict New comments Fixed Still open
✅ Approved 2 0 0
Finding Where
🟡 Fix the invalid result declaration in this example docs/examples/analytics/create-event.md:10
🟡 Assert the result and request made by createEvent test/services/analytics_test.dart:77
Fix with agent prompt
### Issue 1
docs/examples/analytics/create-event.md:10
**Fix the invalid result declaration in this example**

`models. result` is not valid Dart syntax, so this new example cannot be copied and compiled as written. Use a valid declaration such as `final result = await ...`.

### Issue 2
test/services/analytics_test.dart:77-81
**Assert the result and request made by createEvent**

This test never asserts `response` or verifies the request arguments, so it still passes if the endpoint path or body is wrong, or if the method returns incorrect data. Existing service tests assert observable results; please add an assertion and verify the new endpoint contract.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
📂 Walkthrough · 6
File Change
CHANGELOG.md, README.md, pubspec.yaml, android/build.gradle, lib/src/client_browser.dart, lib/src/client_io.dart Updates release notes and package, native, and request SDK version references to rc.8.
lib/appwrite.dart, lib/services/analytics.dart Exports the tracking APIs and adds the Analytics event endpoint service.
lib/services/account.dart, docs/examples/account/create-o-auth-2-session.md, docs/examples/account/create-o-auth-2-token.md Adds the optional OAuth2 state parameter and includes it in the request examples.
lib/src/tracking.dart, lib/src/tracking_observer.dart Adds lifecycle event tracking, manual analytics helpers, and named-route screen tracking.
docs/examples/analytics/create-event.md Adds an example for sending an analytics event.
test/services/analytics_test.dart Adds a test for the new Analytics service.

Reviewed 529c93e · 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 · Looks good to merge. Summary


Analytics analytics = Analytics(client);

models. result = await analytics.createEvent(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix the invalid result declaration in this example

models. result is not valid Dart syntax, so this new example cannot be copied and compiled as written. Use a valid declaration such as final result = await ....

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/examples/analytics/create-event.md
Line: 10

Comment:
**Fix the invalid result declaration in this example**

`models. result` is not valid Dart syntax, so this new example cannot be copied and compiled as written. Use a valid declaration such as `final result = await ...`.

---

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

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

Comment on lines +77 to +81
final response = await analytics.createEvent(
propertyId: "<PROPERTY_ID>",
name: "<NAME>",
url: "https://example.com",
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Assert the result and request made by createEvent

This test never asserts response or verifies the request arguments, so it still passes if the endpoint path or body is wrong, or if the method returns incorrect data. Existing service tests assert observable results; please add an assertion and verify the new endpoint contract.

Prompt To Fix With AI
This is a comment left during a code review.
Path: test/services/analytics_test.dart
Line: 77-81

Comment:
**Assert the result and request made by createEvent**

This test never asserts `response` or verifies the request arguments, so it still passes if the endpoint path or body is wrong, or if the method returns incorrect data. Existing service tests assert observable results; please add an assertion and verify the new endpoint contract.

---

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

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

@lohanidamodar
lohanidamodar merged commit a9b8700 into main Oct 8, 2026
3 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.

1 participant