• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 22071478063
80%

Build:
DEFAULT BRANCH: main
Ran 16 Feb 2026 05:06PM UTC
Jobs 1
Files 70
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Feb 2026 05:01PM UTC coverage: 80.366% (+0.02%) from 80.342%
22071478063

push

github

web-flow
fix(realtime): add explicit type cast to fix web hot restart TypeError (#1308)

* fix(realtime): add explicit type cast to fix web hot restart TypeError

Fixes TypeError when using RealtimeChannel.off() on Flutter web during hot restart.
JavaScript interop causes type inference to fail on .where().toList() chains,
returning List<dynamic> instead of List<Binding>, which fails type checks.

Root Cause:
- RealtimeChannel.off() at line 475-478 used .where().toList() without explicit casting
- RealtimeClient.remove() at line 332 had similar pattern
- During web hot restart, JS interop loses type information
- Assignment back to typed collections (Map<String, List<Binding>>, List<RealtimeChannel>) fails

Solution:
- Added .cast<Binding>() to RealtimeChannel.off() after .toList()
- Added .cast<RealtimeChannel>() to RealtimeClient.remove() after .toList()
- Follows existing pattern in realtime_presence.dart (lines 172, 177, 240, 303)
- Consistent with type safety improvements from commit 102595d

Acceptance Criteria:
- [x] The off() method successfully removes event bindings on Flutter web without type errors
- [x] Hot restart on Flutter web no longer throws TypeError
- [x] All existing tests pass (98 tests)
- [x] No breaking changes to public API
- [x] Type safety maintained across all platforms
- [x] Similar pattern in realtime_client.dart reviewed and fixed

Testing:
- Added test case documenting the web hot restart issue
- Verified all 98 tests pass in realtime_client package
- No functional changes, only type safety improvements

Linear: SDK-640
GitHub: https://github.com/supabase/supabase-flutter/issues/1307

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Update packages/realtime_client/test/channel_test.dart

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

10 of 10 new or added lines in 2 files covered. (100.0%)

3385 of 4212 relevant lines covered (80.37%)

2.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22071478063.1 16 Feb 2026 05:06PM UTC 70
80.37
GitHub Action Run
Source Files on build 22071478063
  • Tree
  • List 70
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22071478063
  • bfa480a1 on github
  • Prev Build on main (#22063286207)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc