【问题标题】:Flutter stepper inside appbar应用栏内的颤振步进器
【发布时间】:2021-08-29 06:58:52
【问题描述】:

我可以在应用栏内使用水平步进小部件吗?如果没有,我该如何“覆盖”应用栏并对其进行自定义以执行我想做的事情? (我只需要3个步骤) 谢谢!

【问题讨论】:

  • 任何你想使用应用栏的原因,否则你可以使用容器
  • @PiyushKumar ,你有例子吗?我以前做不到。谢谢
  • 我会在答案框中输入代码试试

标签: flutter stepper uistepper flutter-appbar


【解决方案1】:

简单明了的不要使用 appBar。 这是示例代码

return Scaffold(
  body: Column(
    children: [Stepper(), //add here the other widgets you want]);

【讨论】:

    【解决方案2】:

    只需使用 AppBar 的 bottom 属性即可。步进器需要由 PreferredSize Widget 包裹。

    AppBar(
      bottom: PreferredSize(
        preferredSize: const Size.fromHeight(110.0),
        child: Stepper(),
      ),
      actions: [],
    )
    

    它对我有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-19
      • 1970-01-01
      • 1970-01-01
      • 2020-07-24
      • 1970-01-01
      • 2021-08-11
      • 2019-12-27
      • 2021-08-11
      相关资源
      最近更新 更多