代码之家  ›  专栏  ›  技术社区  ›  Darshan

在ios模拟器上,插件被切断

  •  0
  • Darshan  · 技术社区  · 7 年前

    卡小部件(黄色)在iOS模拟器的最后被切断,而它在Android模拟器上正确显示,如下所示:

    网间网操作系统:

    enter image description here

    安卓

    enter image description here

    Widget _editButton() {
        return new Container(
            padding: new EdgeInsets.all(10.0),
            child: new Column(
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: <Widget>[
                  Card(
                    color: Colors.yellow,
                      elevation: 2.0,
                      child: FlatButton(
                        splashColor: Colors.greenAccent,
                        onPressed: () {},
                      ))
                ]));
      }
    

    如何对齐卡以使其一致(如在Android上)?

    Nexus 6P(1440 x 2560:560dpi)

    iPhone 8

    1 回复  |  直到 7 年前
        1
  •  0
  •   Darshan    7 年前

    我通过设置 width 属于 Positioned 小工具在里面 Stack

    媒体查询.of(上下文)。尺寸.宽度