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

supabase / supabase-flutter / 27912358077 / 1
86%
main: 86%

Build:
DEFAULT BRANCH: main
Ran 21 Jun 2026 05:45PM UTC
Files 1
Run time 0s
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

21 Jun 2026 05:41PM UTC coverage: 79.032%. Remained the same
27912358077.1

push

github

web-flow
chore(supabase_lints): enable prefer-correct-json-casts (#1430)

Stacked on #1429.

## What

Enables `prefer-correct-json-casts`, which warns that casting a decoded
value directly to a concrete generic type (e.g. `as List<Presence>`, `as
Map<String, String>`) can throw at runtime. The fix follows the rule's
recommendation: cast through a non-generic type first, then narrow the
elements.

- `functions_client`: `body as Map<String, String>?` -> `(body as
Map?)?.cast<String, String>()`
- `realtime_client` presence payloads
(`RealtimePresenceJoinPayload`/`LeavePayload.fromJson`):
`json['newPresences'] as List<Presence>` -> `(json['newPresences'] as
List).cast()` (the element type is inferred from the constructor
parameter, so no explicit `<Presence>` to keep
`avoid-inferrable-type-arguments` happy).

## Behavior-preserving

These are not bug fixes, just safer casts:
- The presence lists are built client-side as `List<Presence>` (via
`RealtimePresence._transformState`; `state` is `Map<String,
List<Presence>>`), so the original cast worked at runtime; `.cast()`
preserves that.
- The functions `body` is asserted to be a `Map<String, String>` (or
null) just above.

## Verification
- `dcm analyze packages` -> no issues found.
- `dart analyze` clean (lib + test) for functions_client and
realtime_client.
- Tests: functions_client 36 pass, realtime_client
(channel/socket/mock/transformers) 101 pass.

49 of 62 relevant lines covered (79.03%)

1.29 hits per line

Source Files on job yet_another_json_isolate - 27912358077.1
  • Tree
  • List 1
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 27912358077
  • ad755725 on github
  • Prev Job for on main (#27911656760.3)
  • Next Job for on main (#27912627757.3)
  • 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