Repository navigation
feat: Flutter SDK update for version 27.1.0-rc.8 - #337
Conversation
🔵 Tier A · Mergeable after minor fixes
This release adds the Analytics service and Flutter tracking helpers, including lifecycle and route-based event tracking, and adds OAuth2
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
Reviewed |
|
|
||
| Analytics analytics = Analytics(client); | ||
|
|
||
| models. result = await analytics.createEvent( |
There was a problem hiding this 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 ....
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.
| final response = await analytics.createEvent( | ||
| propertyId: "<PROPERTY_ID>", | ||
| name: "<NAME>", | ||
| url: "https://example.com", | ||
| ); |
There was a problem hiding this 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.
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.
Generated with sdk-generator
5.5.4.What's Changed
Analyticsservice, theTrackinghelper andTrackingObserver, which were missing from27.1.0-rc.5throughrc.7Trackingtakes theAnalyticsservice and a property id instead of an emitter callbackenableAllAutoTracking()is nowstart()inactivewithout backgroundingThe three fixes address the review findings on #336.
Why analytics went missing
The analytics surface dropped out of
27.1.0-rc.5throughrc.7because it only existed on short-lived RC branches that were never merged, so anything cut frommainlost it. Going throughdev → mainis what stops that recurring.Verification
Against a real Flutter toolchain:
dart analyze libreports zero error-level issues, andflutter pub publish --dry-runreports only the two pre-existing warnings (thedocs/→doc/layout convention and the snake_caseoauth2_*model fields), both of which the published27.1.0-rc.4also had.No deletions.
Breaking only for the
27.1.0-rc.*prereleases that ship the oldAnalyticsTracking; stable (27.0.0) is unaffected.