modal_bottom_sheet icon indicating copy to clipboard operation
modal_bottom_sheet copied to clipboard

Change clipBehaviour to Clip.antiAlias for smooth corners

Open LEMUSADR000 opened this issue 4 years ago • 8 comments

The top bar of the page has screen white artifact-like pixels on left and right corners. Here are some images:

  1. What it looks like on my project Screenshot_20201221-110302

  2. What it looks like on project 'Modal with PageView' sample Screenshot_20201221-110350

Closer shot for clarity: Screenshot_20201221-110350

Steps to reproduce:

  • Download example project
  • Run application on Android device (I used Moto g7)
  • Click on 'Modal with PageView'

So far I've tried tweaking shape, topRadius, and various color options but they don't seem to change the presence of these artifacts. Do you know how to fix this? If not, do you know what could be the cause so I could possibly fix it myself and submit an MR?

LEMUSADR000 avatar Dec 21 '20 19:12 LEMUSADR000

Yes, I think it is the added border that it should not be there. I will remove it in the next version

jamesblasco avatar Dec 21 '20 21:12 jamesblasco

This is a great looking package, thanks for all of your work on this!

LEMUSADR000 avatar Dec 21 '20 22:12 LEMUSADR000

In one of my own apps, I have a Clipper with the same shape as an underlying Container. I still wanted the Border to match, but I ended up reducing the radius of my clipper by 0.5 compared to the container for a cleaner edge. Probably irrelevant in this situation, but something to have in mind.

Zabadam avatar Jan 15 '21 14:01 Zabadam

Hello, there are two errors in the BarBottomSheetRight now. First there was a unneeded border that has been removed, Second, the clips had the behavior Clip.hardEdge by default. Clip.antiAlias is much smoother, but it is slower. I will try that in my projects, and if it goes well I will make the change soon. Feel free to try it by adding the param clipBehaviour

jamesblasco avatar Feb 19 '21 14:02 jamesblasco

Changing clipBehavior didn't seem to make a noticeable difference in the behavior I was seeing. I'm still getting the white artifacts. Are there any branches I could check out on my project to test some new changes? I'd be completely up for doing something like that if it would help anything.

LEMUSADR000 avatar Feb 24 '21 18:02 LEMUSADR000

Any way to deal with this?

armandojimenez avatar Apr 15 '21 02:04 armandojimenez

I couldn't seem to find a legit workaround for it so I just made any usages of this widget have white bar colors for now. The shape is still messed up, though. It doesn't seem to have a perfect radius.

LEMUSADR000 avatar Apr 16 '21 17:04 LEMUSADR000

I have never personally experienced this visual bug when using this package, but I also use bespoke styled objects for each portion of the [SlidingSheet], i.e. my [SlidingSheet.headerBuilder] returns a [SlidingSheetHeader].

I do not use any of the built-in borderRadius parameters. Are you? If so, you could instead change the borderRadius of your header manually to see if that is the culprit.

Zabadam avatar Apr 16 '21 21:04 Zabadam