Rounded borders on SliverAppBar in flutter - flutter

How do you make rounded bottom-corners on a SliverAppBar?
I know of 2 ways, but they just don't quite cut it.
1: To use "shape: ContinuousRectangleBorder". The reason this doesn't cut it, is because it's not Circular, but this weird square-circle thing, so it doesn't look the right way. If it's possible to make it with this, and still retain the roundness to it, then please comment that :)
2: To make a container with rounded corners in the SliverAppBar. This is not quite it, because then when you scroll it disappears really early, and you just left with this empty white space in the top of the screen.
If you have any idea, please help. And remember this is a SliverAppBar, not a normal AppBar, there it would be easy.

The first way is the better and recommended way.
You can use RoundedRectangleBorder instead of ContinuousRectangleBorder
You can also visit: https://api.flutter.dev/flutter/painting/RoundedRectangleBorder-class.html
You can also check: https://api.flutter.dev/flutter/painting/CircleBorder-class.html for CircleBorder

Related

Is an angled divider between expanded images in row -- Flutter

Trying to implement this kind of look in Flutter:
Currently, I have a Row with Expanded images in it. So they both share half of the container without padding. The next step is an angled divider between them.
How would you go about it? I understand something like ClipPath is involved here, but I am not entirely sure how to approach the task.
You can consider these two pictures as 2 layers, one on top, and the other one on the bottom. You can use Stack to stack them like that. You can then use ClipPath like you said, to clip the top layer, so some parts of the bottom layer would become visible. The key takeaway is to use a Stack instead of using a Row widget, otherwise the 2 pictures would be on the "same level" and clipping one would not reveal the other.

How to mask widgets with rounded corners on scroll - Flutter

How do you make the top section where the widgets scroll and disappear on top has rounded corners so it seems natural?
To make it clearer, here's what I tried to do but didn't work:
The idea is to make the blue-colored section in the middle transparent to show the widgets when it scrolls to disappear while having rounded corners to keep the design language consistent. But so far, if I were to remove the blue color, the widgets would just disappear on the line like how it is with color.
I tried to use WidgetMask and ClipPath but it didn't work like in the example.
Any idea on how to solve this?

Overlay/translate ListView builder items clipped with a custom ClipPath

I'm generating multiple widgets(Containers in this case) using a ListView.builder and I also use a custom ClipPath to give a custom shape to them.
I was wondering if would it be possible to translate or somehow overlay those list items in order to place them so that the background(black area in the attached screenshot) would be covered. By that I mean I want to place them right under each other, like puzzle pieces. To be able to fit them right under each other would probably mean they would have to be overlayed somehow. Was googling but without any success.
Hopefully there's some Flutter experts out there who are nice enough to guide me. Thanks a lot!

Advanced Auto-Layout in Xcode 6

I've build this view in inferred size in Xcode 6 -
Every button is in an image view. When i run the app it looks terrible.
I know a little bit about auto-layout but i can't make it look good.
Any tips?
I guess the only way to help you is to suggest you grabbing a good auto-layout tutorial. I guess this one is perfect in your case: https://www.youtube.com/watch?v=IwSTXY0awng
Hope you will get a better understanding of using auto-layout.
Nevertheless if you want some immediate tips, here are some. Remember that I can only guess how the appearance should look like on other screen, it all depends on your vision:
1)Set the trailing space and leading space to superview for the blue rectangle. Don't forget to pin it on the top as well
2) Set leading space for YT and FB buttons, the first should be pinned to the blue rectangle while the latter should be pinned to the bottom of subview.
3) Do the analogy with yellow and green one, but set the trailing space instead of leading space
4) Twitter button should be pinned to fb icon and to the bottom of subview

Gap in UI of Border layout in codenameone

I try to make a frame having border layout.
In it i have 3 container- top, center and bottom . all three container has 3 different type of background. but when i see them there is little gap between these layouts which makes UI little separated and not looks good.
Please help me that how can i consume these gaps and my container looks merged.
Thanks in advance...
Please check this image. it explains u gap. i have mentioned it in red color. please help.
Make sure to set the margin for the Containers to 0. A screenshot/code might be helpful to pinpoint this.