问题描述
在滚动时,我想将SliverAppBar
固定在TabBar
上,但是在标签栏之前,我希望在它们之间有一个菜单。
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomPadding: false,body: NestedScrollView(
controller: _scrollViewController,headerSliverBuilder: (BuildContext context,bool boxIsScrolled) {
return <Widget>[
SliverAppBar(
backgroundColor: Colors.green,pinned: true,floating: true,expandedHeight: 60,forceElevated: boxIsScrolled,flexibleSpace: Conatainer(//All my buttons and stuff were supposed go in here);
}
}
出于说明目的,当我滚动时,选项卡栏应该向上移动。
如您所见here,我认为flexibleSpace
不适合用于承载大量上下文(两个图像和中间的文本)。当我尝试使用一些示例代码来填充flexibleSpace
中的所有内容时,正如您看到的here
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)