【问题标题】:What's the best way to create a vertical button menu in Flutter?在 Flutter 中创建垂直按钮菜单的最佳方法是什么?
【发布时间】:2020-06-30 18:02:32
【问题描述】:

这里是菜鸟。

我正在 Android Studio 中制作应用菜单,使用 Flutter/dart 作为我的代码库。我需要在垂直列中放置一系列水平按钮。

按钮设计本质上是一个轮廓按钮。白色按钮,但带有灰色轮廓。

最好将这些按钮放在 ListView 中并将 OutLineButtons 作为按钮,或者将它们放在一列中,并且该列的子项是包含按钮的行?

感谢您的建议。

An image i pulled from google to illustrate the layout of what i'm looking for

【问题讨论】:

  • 你能分享任何你实际需要的图片吗

标签: flutter button dart


【解决方案1】:

欢迎来到 Flutter 世界。

您可以使用Column 类来执行此操作。 [Here is the doc]

Column 里面,您可以添加任意数量的小部件。 示例:

Column(
  children: <Widget>[
  //Your first menu widget
  //Your second menu widget
  //Your third menu widget
  ],
)

您可以阅读文档或查找教程以获取更多信息。快乐创作

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-07
    • 1970-01-01
    • 1970-01-01
    • 2015-12-30
    • 2019-09-22
    • 1970-01-01
    • 2019-11-28
    相关资源
    最近更新 更多