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

TopBar background color (corner bug) #162

Closed
vicenterusso opened this issue Mar 12, 2024 · 6 comments
Closed

TopBar background color (corner bug) #162

vicenterusso opened this issue Mar 12, 2024 · 6 comments
Labels
bug Something isn't working in triage

Comments

@vicenterusso
Copy link

Bug report

There is a very thin border that Is bothering me on top bar

Scenario 1 (with corner bug)

Code

WoltModalSheetPage(
  hasSabGradient: false,
  forceMaxHeight: true,
  topBar: Container(
    color: infoBlue,
    child: // etc ...

Image: (check corners)
IMG_7367
Screenshot 2024-03-12 at 16 55 40

Scenario 2 (no corner bug)

Code

WoltModalSheetPage(
  hasSabGradient: false,
  forceMaxHeight: true,
  backgroundColor: infoBlue,
  topBar: Container(
    child: // etc ...

Image:
IMG_7368
Screenshot 2024-03-12 at 16 58 27

Expected behavior

I cannot use second code because the whole modal with have "infoBlue" color. I expect a smooth corner without any white glitches.

@vicenterusso vicenterusso added bug Something isn't working in triage labels Mar 12, 2024
@ulusoyca
Copy link
Collaborator

Do you see difference if you set the clip behavior in the theme data to Clip.antiAliasWithSaveLayer in https://github.com/woltapp/wolt_modal_sheet/blob/main/lib/src/theme/wolt_modal_sheet_theme_data.dart#L32

antiAlias Vs antiAliasWithSaveLayer

@vicenterusso
Copy link
Author

Yep, that fixes it. Why this is not the default value? Whats the usecase for Clip.antiAlias and not Clip.antiAliasWithSaveLayer?

@ulusoyca
Copy link
Collaborator

This is a valid question. The Flutter SDK defaults to Clip.none. I can't recall the reasoning but I think we can default to Clip.antiAliasWithSaveLayer. What do you think @TahaTesser?

@ulusoyca
Copy link
Collaborator

@vicenterusso Here is the PR: #164

@vicenterusso
Copy link
Author

@vicenterusso Here is the PR: #164

Perfect!

@TahaTesser
Copy link
Collaborator

This is a valid question. The Flutter SDK defaults to Clip.none. I can't recall the reasoning but I think we can default to Clip.antiAliasWithSaveLayer. What do you think @TahaTesser?

It defaults to none as clipping is not necessary when you don't provide a shape, but in the package, if you're always providing a shape then you can definitely the change the default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in triage
Projects
None yet
Development

No branches or pull requests

3 participants