Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add standard client headers #1130

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

grdsdev
Copy link
Contributor

@grdsdev grdsdev commented Mar 12, 2025

What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

Copy link

linear bot commented Mar 12, 2025

@coveralls
Copy link

coveralls commented Mar 12, 2025

Pull Request Test Coverage Report for Build 14311896796

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 75.451%

Files with Coverage Reduction New Missed Lines %
packages/supabase/lib/src/supabase_client.dart 2 67.53%
Totals Coverage Status
Change from base Build 14080727348: 0.03%
Covered Lines: 2846
Relevant Lines: 3772

💛 - Coveralls

@grdsdev grdsdev changed the title feat: add standard client headers feat: Add standard client headers Mar 12, 2025

class Constants {
static const Map<String, String> defaultHeaders = {
static String get platform {
return Platform.operatingSystem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this is still draft, but still want to mention that this won't work on web.
You will either need a conditional import, or probably better use a constant to guard web with a definition like the kIsWeb in flutter:

const bool kIsWeb = bool.fromEnvironment('dart.library.js_util');

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @Vinzent03

Do we have any test for asserting that it doesn't break in Web? Didn't see any fail on CI.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sadly not yet, but hopefully #1140 solves this

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.

3 participants