Я пытаюсь разработать панель приложения, когда прокрутка скрыта. Я успешно создал, но панель приложений мала
Код ниже предоставляет мне панель приложений, подобную этой
@override
Widget build(BuildContext context) {
return Scaffold(
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
backgroundColor: Colors.transparent,
title: PreferredSize(
child: ClipPath(
clipper: CustomAppBar(),
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
' Bike Guru',
style: GoogleFonts.caveatBrush(
fontSize: 40,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
],
),
),
),
preferredSize: Size.fromHeight(kToolbarHeight + 350)),
floating: true,
pinned: false,
),
];
},
Я пытаюсь получить результат, который скрывается при прокрутке вниз
штрих-код пользовательского приложения
class CustomAppBar extends CustomClipper<Path> {
@override
Path getClip(Size size) {
Path path = new Path();
path.lineTo(0, size.height);
path.quadraticBezierTo(
size.width / 4, size.height - 40, size.width / 2, size.height - 20);
path.quadraticBezierTo(
3 / 4 * size.width, size.height, size.width, size.height - 20);
path.lineTo(size.width, 0);
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
return false;
}}