【问题标题】:hello, i want to make screens like this in flutter你好,我想在颤动中制作这样的屏幕
【发布时间】:2022-11-01 19:27:39
【问题描述】:

如何实现顶部的按钮?

【问题讨论】:

    标签: flutter dart


    【解决方案1】:

    阅读颤振食谱有很多有用的例子。

    https://docs.flutter.dev/cookbook/lists/horizontal-list

    【讨论】:

      【解决方案2】:

      尝试这个:

      ListView(   // This next line does the trick.   scrollDirection: Axis.horizontal,   children: <Widget>[
          Container(
            width: 160.0,
            color: Colors.red,
          ),
          Container(
            width: 160.0,
            color: Colors.blue,
          ),
          Container(
            width: 160.0,
            color: Colors.green,
          ),
          Container(
            width: 160.0,
            color: Colors.yellow,
          ),
          Container(
            width: 160.0,
            color: Colors.orange,
          ),   ], ),
      

      【讨论】:

        猜你喜欢
        • 2015-07-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-11-04
        • 2022-12-06
        • 2019-11-11
        • 2021-04-21
        • 2016-05-22
        相关资源
        最近更新 更多