【发布时间】:2021-10-16 10:09:01
【问题描述】:
我在主课中使用了 SlidingUpPanel。 在主类中,我有一个底部工作表,然后单击底部工作表图标,加载页面。 现在,当我必须使用 SlidingUpPanel 时,我在正文中加载页面时遇到问题。 谁能帮助我如何在 SlidingUpPanel 的正文中加载底部导航的页面?
Widget build(BuildContext context) {
var pageWidth = MediaQuery.of(context).size.width;
return Scaffold(
body: SlidingUpPanel(
controller: _pc,
panelBuilder: (sc) {
if (!isCollapsed) _pc.hide();
return Container(
child: Center(child: Text("Panel")),
);
},
body: //here I want to load click bottom navigation page
),
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
onTap: (index) {
switch (index) {
case 0:
{
Navigator.pushReplacementNamed(context, '/');
break;
}
case 1:
{
Navigator.pushNamed(context, '/search');
break;
}
case 2:
{
Navigator.pushNamed(context, '/library');
break;
}
case 3:
{
Navigator.pushNamed(context, '/profile');
break;
}
}
},
items[...]
),
);
}
有人可以帮帮我吗?
【问题讨论】:
标签: flutter dart panel bottom-sheet flutter-bottomnavigation