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

supabase / supabase-flutter / 36693820421
93%

Build:
DEFAULT BRANCH: main
Ran 30 Sep 2026 09:07AM UTC
Jobs 11
Files 172
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

30 Sep 2026 09:05AM UTC coverage: 91.289% (+0.06%) from 91.228%
36693820421

push

github

web-flow
feat(supabase_flutter): add RealtimeLifecycleOptions to delay or skip the realtime disconnect on pause (#1899)

## Summary

`Supabase.initialize` installs an app lifecycle listener that
disconnects the realtime socket as soon as the app is paused and, on
resume, reconnects it and rejoins every joined channel. That is not
configurable, and on iOS a full-screen view such as a video ad or a
system sheet reports the app as paused while it is on screen. An app
that shows many of those tears down and rebuilds the socket, and
re-authorizes every private channel, once per ad.

This adds `RealtimeLifecycleOptions`, passed as
`realtimeLifecycleOptions` to `Supabase.initialize`:

- `disconnectAfterPause`: a grace period. The disconnect is scheduled
when the app is paused and cancelled if the app is resumed first, so a
short pause costs nothing. `detached` still disconnects right away.
Defaults to `Duration.zero`, which is the current behaviour.
- `RealtimeLifecycleOptions.manual()`: the socket is left out of the
lifecycle handling entirely. Plugins are still resumed.

```dart
await Supabase.initialize(
  url: url,
  publishableKey: key,
  realtimeLifecycleOptions: const RealtimeLifecycleOptions(
    disconnectAfterPause: Duration(minutes: 1),
  ),
);
```

## Notes

- The pending pause timer is cancelled on resume, detach and dispose, so
a disposed instance never disconnects a client it no longer owns.
- iOS suspends a backgrounded app within seconds and Android 12+ freezes
cached apps, and no Dart timer runs while frozen. The pause therefore
also records a `DateTime.now()` stamp, and a resume after a pause that
outlasted the grace period closes the possibly dead socket before
reconnecting, which is today's behaviour for real backgrounding. A short
pause such as a full-screen ad, where the process stays in the
foreground on both platforms, still costs nothing.
- The new symbols are registered under
`realtime.configuration.deferred_disconnect` in `sdk-compliance.y... (continued)

38 of 39 new or added lines in 2 files covered. (97.44%)

8834 of 9677 relevant lines covered (91.29%)

4.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
50.0
packages/supabase_flutter/lib/src/realtime_lifecycle_options.dart
Jobs
ID Job ID Ran Files Coverage
11 supabase_flutter - 36693820421.11 30 Sep 2026 09:07AM UTC 15
81.0
GitHub Action Run
6 supabase_realtime - 36609100064.6 29 Sep 2026 06:06PM UTC 13
90.66
GitHub Action Run
2 yet_another_json_isolate - 35608843571.2 21 Sep 2026 01:58PM UTC 1
98.44
GitHub Action Run
8 supabase_common - 35998092270.8 24 Sep 2026 12:18PM UTC 22
87.5
GitHub Action Run
3 postgrest - 36609100064.3 29 Sep 2026 06:08PM UTC 28
94.17
GitHub Action Run
11 supabase - 36609100064.11 29 Sep 2026 06:06PM UTC 18
93.71
GitHub Action Run
8 supabase_auth - 36609100064.8 29 Sep 2026 06:06PM UTC 32
92.07
GitHub Action Run
9 supabase_storage - 36609100064.9 29 Sep 2026 06:05PM UTC 9
97.83
GitHub Action Run
10 supabase_typegen - 36609100064.10 29 Sep 2026 06:05PM UTC 24
95.57
GitHub Action Run
7 supabase_functions - 36609100064.7 29 Sep 2026 06:03PM UTC 4
96.0
GitHub Action Run
5 iceberg - 36609100064.5 29 Sep 2026 06:03PM UTC 6
68.52
GitHub Action Run
Source Files on build 36693820421
  • Tree
  • List 172
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36693820421
  • 52dcd2f4 on github
  • Prev Build on main (#36609100064)
  • Next Build on main (#36696205739)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc