[英]Flutter stepper inside appbar
Can I use an horizontal stepper widget inside the appbar?我可以在应用栏中使用水平步进小部件吗? If not, how can I "override" the appbar and customize it to do what I want to do?如果没有,我该如何“覆盖”应用栏并对其进行自定义以执行我想做的事情? (I just need 3 steps) Thanks! (我只需要 3 个步骤)谢谢!
Plain and simple don't use appBar.简单明了的不要使用 appBar。 here's the example code这是示例代码
return Scaffold(
body: Column(
children: [Stepper(), //add here the other widgets you want]);
Just use the attribute bottom of the AppBar.只需使用 AppBar 的属性底部。 The stepper needs to be wrapped by a PreferredSize Widget.步进器需要由 PreferredSize Widget 包装。
AppBar(
bottom: PreferredSize(
preferredSize: const Size.fromHeight(110.0),
child: Stepper(),
actions: [],
)
It works for me.这个对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.