Я пытался закрыть WhatsApp (версия для iOS) флаттером, используя виджеты Купертино.
при попытке сделать заголовок с CupertinoSliverNavigationBar
я заметил, что вы не можете увеличить высоту CupertinoSliverNavigationBar .
Мой код
return CupertinoPageScaffold(
child: NotificationListener<ScrollNotification>(
onNotification: (scrollNotification) {
if (scrollNotification is ScrollStartNotification) {
_onStartScroll(scrollNotification.metrics);
} else if (scrollNotification is ScrollUpdateNotification) {
_onUpdateScroll(scrollNotification.metrics);
} else if (scrollNotification is ScrollEndNotification) {
_onEndScroll(scrollNotification.metrics);
}
},
child: CustomScrollView(
slivers: <Widget>[
CupertinoSliverNavigationBar(
leading: GestureDetector(
child: Padding(
padding: EdgeInsets.only(top: 10.0),
child: Text(
"Edit",
style: TextStyle(
color: Constants.primaryColor,
fontSize: 18.0,
),
),
),
onTap: ()=>print("Tapped"),
),
trailing: GestureDetector(
child: Icon(
CupertinoIcons.create_solid,
size: 25.0,
),
onTap: ()=>print("Tapped"),
),
automaticallyImplyLeading: false,
largeTitle: Column(
children: <Widget>[
Container(
child: Text(
"Chats",
textAlign: TextAlign.left,
),
),
GestureDetector(
child: SearchBar(),
),
],
),
),
],
),
),
);
Скриншоты ниже:
Чего я хочу достичь
![What i want to achieve](https://i.stack.imgur.com/FWRSQ.png)
Что получаю
![enter image description here](https://i.stack.imgur.com/kV7Ez.png)
Есть ли работа вокруг или как-нибудь увеличить высоту? Спасибо!