SliverAppBar 上的圆形边框颤动
Rounded borders on SliverAppBar in flutter
如何在 SliverAppBar 上制作圆底角?
我知道有 2 种方法,但它们都不太适用。
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.
如果你有什么想法,请帮忙。请记住这是一个 SliverAppBar,而不是一个普通的 AppBar,在那里它会很容易。
第一种方式比较好,值得推荐。
您可以使用 RoundedRectangleBorder
而不是 ContinuousRectangleBorder
您还可以访问:https://api.flutter.dev/flutter/painting/RoundedRectangleBorder-class.html
您还可以检查:https://api.flutter.dev/flutter/painting/CircleBorder-class.html CircleBorder
如何在 SliverAppBar 上制作圆底角? 我知道有 2 种方法,但它们都不太适用。
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.
如果你有什么想法,请帮忙。请记住这是一个 SliverAppBar,而不是一个普通的 AppBar,在那里它会很容易。
第一种方式比较好,值得推荐。
您可以使用 RoundedRectangleBorder
而不是 ContinuousRectangleBorder
您还可以访问:https://api.flutter.dev/flutter/painting/RoundedRectangleBorder-class.html
您还可以检查:https://api.flutter.dev/flutter/painting/CircleBorder-class.html CircleBorder