Skip to content

Conversation

@dshukertjr
Copy link
Member

@dshukertjr dshukertjr commented Mar 18, 2025

What kind of change does this PR introduce?

This PR migrates gotrue to package:web.

Because of version constraints issues, this bumps the minimum Dart version to 3.3.0 and Flutter version to 3.19.0, which has been released in Feb 16, 2024.

What is the current behavior?

Uses the old html API, which causes analysis issue, and is not recommended to keep by the Flutter team.

What is the new behavior?

The new web package is used.

@coveralls
Copy link

coveralls commented Mar 18, 2025

Pull Request Test Coverage Report for Build 14036571806

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 73.758%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/gotrue/lib/src/gotrue_client.dart 0 1 0.0%
Totals Coverage Status
Change from base Build 13855326273: 0.02%
Covered Lines: 2777
Relevant Lines: 3765

💛 - Coveralls

@dshukertjr dshukertjr marked this pull request as ready for review March 18, 2025 19:20
@dshukertjr dshukertjr changed the title fix: Use web package to access web APIs fix(gotrue, supabase, supabase_flutter): Use web package to access web APIs Mar 18, 2025
@dshukertjr dshukertjr requested a review from Vinzent03 March 21, 2025 12:10
@dshukertjr dshukertjr requested a review from Vinzent03 March 24, 2025 01:34
Copy link
Collaborator

@Vinzent03 Vinzent03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dshukertjr
Copy link
Member Author

@Vinzent03

There is still a html import here: https://github.com/supabase/supabase-flutter/blob/fix/gotrue-web/packages/supabase_flutter/lib/src/local_storage_web.dart#L2-L2

I think changing this one should be its own PR as the API has slightly changed. It's not simple swaping in and out.

and this comment: https://github.com/supabase/supabase-flutter/blob/fix/gotrue-web/packages/gotrue/lib/src/types/auth_state.dart#L8-L8 could probably be improved as well now.

Fixed.

@Vinzent03
Copy link
Collaborator

From a quick look at the documentation it seems like a quick swap of the import and method names should be possible. You changed the behavior of the broadcast channel as well, so I don't quite get the differentiation to this migration here...

Since this is a breaking change due to the changed dart sdk requirements, I would at least release this pr as a new minor version.

@dshukertjr dshukertjr changed the title fix(gotrue, supabase, supabase_flutter): Use web package to access web APIs feat(gotrue, supabase, supabase_flutter): Use web package to access web APIs Mar 24, 2025
@dshukertjr dshukertjr changed the title feat(gotrue, supabase, supabase_flutter): Use web package to access web APIs feat(gotrue, supabase, supabase_flutter, realtime): Use web package to access web APIs Mar 24, 2025
@dshukertjr dshukertjr changed the title feat(gotrue, supabase, supabase_flutter, realtime): Use web package to access web APIs feat(gotrue, supabase, supabase_flutter, realtime_client): Use web package to access web APIs Mar 24, 2025
@dshukertjr dshukertjr merged commit dfa71c9 into main Mar 24, 2025
17 checks passed
@dshukertjr dshukertjr deleted the fix/gotrue-web branch March 24, 2025 15:26
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.

4 participants