Skip to content

fix: raise min Dart SDK to 3.4.0 across all packages - #1409

Merged
spydon merged 4 commits into
mainfrom
chore/bump-min-sdk-3.4
Jun 15, 2026
Merged

spydon merged 4 commits into
mainfrom
chore/bump-min-sdk-3.4

Conversation

@spydon

@spydon spydon commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Raises the minimum Dart SDK to >=3.4.0 for every package in the workspace (functions_client, gotrue, postgrest, realtime_client, storage_client, supabase, supabase_flutter, yet_another_json_isolate) so the floor is consistent across the repo. Also:

  • supabase_flutter: environment.flutter >=3.19.0 → >=3.22.0 (the release that bundled Dart 3.4.0)
  • CI: the test-flutter matrix floor 3.19.x → 3.22.x
  • Example app: corrects its stale >=2.15.0 <3.0.0 constraint to >=3.4.0 <4.0.0

Why

supabase_flutter needs Dart 3.4.0 to add the passkeys plugin (see the stacked passkey PR #1408): passkeys → passkeys_web ^2.8.1 → web ^1.1.1, and web >=1.0.0 requires Dart >=3.4.0.

Because passkeys >=2.17.4 depends on passkeys_web ^2.8.1 which depends on web ^1.1.1,
passkeys >=2.17.4 requires web ^1.1.1.
So, because web >=1.0.0 requires SDK version >=3.4.0 <4.0.0 ...

Bumping every package keeps the supported-SDK floor uniform rather than having supabase_flutter diverge from the rest.

Note: passkeys/passkeys_web themselves declare sdk: ">=3.0.0" even though they really require 3.4.0. Submitted an upstream fix for that so the constraint is honest: corbado/flutter-passkeys#243.

Note

Raising the minimum SDK is a breaking change for consumers still on Dart 3.3.x, so this should land in a minor/major release rather than a patch.

Test plan

  • melos bootstrap resolves all 9 packages on Dart 3.4.0+
  • CI matrix updated so the min-version job uses an SDK that satisfies the new floor

spydon added 2 commits June 15, 2026 17:43
passkeys >=2.17.4 transitively depends on web ^1.1.1, which requires
Dart 3.4.0. Raise the min SDK to 3.4.0 and Flutter to 3.22.0 (the
release that bundled that SDK) so version solving succeeds.
The supabase_flutter min SDK is now 3.4.0, so the 3.19.x job (Dart
3.3.x) can no longer resolve the package. Test against 3.22.x, the
first Flutter release bundling Dart 3.4.0.
@spydon
spydon requested a review from a team as a code owner June 15, 2026 15:44
Bump the min SDK to >=3.4.0 for every package in the workspace so the
floor is consistent, not just supabase_flutter. Also corrects the
example app's stale >=2.15.0 <3.0.0 constraint.
@spydon spydon changed the title chore(supabase_flutter): raise min SDK to Dart 3.4.0 / Flutter 3.22.0 chore: raise min Dart SDK to 3.4.0 across all packages Jun 15, 2026
@spydon spydon changed the title chore: raise min Dart SDK to 3.4.0 across all packages fix: raise min Dart SDK to 3.4.0 across all packages Jun 15, 2026
Convert constructor key parameters to super parameters and drop the
unused key parameter from the private form widgets, resolving the
use_super_parameters and unused_element_parameter lints that the new
SDK floor enabled in the example app.
@spydon
spydon merged commit 311f883 into main Jun 15, 2026
63 of 65 checks passed
@spydon
spydon deleted the chore/bump-min-sdk-3.4 branch June 15, 2026 20:48
spydon added a commit that referenced this pull request Jun 16, 2026
> 📚 Stacked on #1409 (min SDK bump). Review/merge that first; this PR is
based on its branch and GitHub will retarget it to `main` automatically
once #1409 merges.

## What

Adds two convenience methods on `GoTrueClient` so developers using
passkeys no longer have to hand-write the platform WebAuthn ceremony:

- `supabase.auth.signInWithPasskey({captchaToken})`
- `supabase.auth.registerPasskey()`

Each runs the full flow end to end: start the challenge with the
Supabase server, perform the platform prompt (FaceID/TouchID/security
key), and verify the credential with the server.

## Why

gotrue already exposes the **server** side of the ceremony
(`supabase.auth.passkey.*`), but the **client** side was left entirely
to developers. The only reference was a web-only, hand-written
`dart:js_interop` bridge, with nothing for iOS/Android/macOS. This moves
that work into the library.

## How

- Pulls in the cross-platform
[`passkeys`](https://pub.dev/packages/passkeys) plugin to drive the
ceremony on every supported platform (web included).
- A thin mapper (`passkey_options_mapper.dart`) converts gotrue's W3C
`PublicKeyCredentialCreationOptionsJSON` / `RequestOptionsJSON` into the
plugin's request types. The plugin's `fromJson` already reads the same
W3C field names, so this is nearly a passthrough; the only
normalizations are stripping base64url padding from the
challenge/credential ids and defaulting `transports` to `[]`. The
response direction is free (`toJson()` already matches what gotrue's
`verify*` expects).
- The new extension and the gotrue passkey API are marked
`@experimental`.

## Web

Uses the `passkeys` package on web as well, for a single code path and
wider browser support. Web adopters include the package's `bundle.js` in
`index.html` (documented in the README). The lightweight `js_interop`
bridge was intentionally not kept/contributed upstream, since Corbado's
bundle exists for real reasons (broader browser support, conditional UI,
support detection).

## Notes

- `passkeys` does not support Linux; `linux` stays in `platforms:`
(removing it would break non-passkey Linux users), so passkey calls
there fail at runtime rather than at build time.
- Platform setup the library cannot do (Associated Domains,
`assetlinks.json`, web `bundle.js`) is documented in the package README.

## Test plan

- [x] `flutter analyze` clean, `dart format` applied
- [x] Full `supabase_flutter` suite passing (49/49), including new
mapper unit tests (field passthrough, padding stripping, `transports`
defaulting)
- [ ] Manual end-to-end run against a project with passkeys enabled, on
web and one native platform
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.

2 participants