为什么两个容器颤动之间有一条白线

问题描述 投票:2回答:1

我正在为我的应用制作一个抽屉,并且它在列小部件中有2个容器,这些容器之间似乎有一条线破坏了外观,我已经尝试过用于上部容器了]]

  margin: EdgeInsets.only(bottom: 0),
  padding: EdgeInsets.only(bottom: 0),

以及下面的容器的这个

  margin: EdgeInsets.only(top: 0),
  padding: EdgeInsets.only(top: 0),

仍然保留该行。如何删除该行,任何帮助将不胜感激。这是抽屉的代码:

Drawer(
  child: Column(
    children: <Widget>[
      Container(
        height: globals.heightofdevice * 0.30,
        width: double.infinity,
        margin: EdgeInsets.only(bottom: 0),
        padding: EdgeInsets.only(bottom: 0),
        child: Stack(
          children: <Widget>[
            Image.asset(
              './images/drawerbackground.jpg',
              fit: BoxFit.fitWidth,
            ),
            Positioned(
              left: globals.widthofdevice * 0.07,
              bottom: 20,
              child: Text(
                globals.username,
                style: GoogleFonts.quicksand(
                  textStyle: TextStyle(
                    // fontWeight: FontWeight.w700,
                    fontSize: 32,
                    color: Colors.white,
                  ),
                ),
              ),
            )
          ],
        ),
      ),
      Container(
        height: globals.heightofdevice * 0.70,
        margin: EdgeInsets.only(top: 0),
        padding: EdgeInsets.only(top: 0),
        decoration: BoxDecoration(
          gradient: LinearGradient(
            colors: [Colors.redAccent, Colors.white],
            begin: Alignment.bottomCenter,
            end: Alignment.topCenter,
          ),
        ),
        child: Stack(children: <Widget>[
          Image.asset(
            './images/uni.jpg',
            fit: BoxFit.cover,
            width: double.infinity,
          ),
          Column(
            children: <Widget>[
              listTileBuilder(Icons.history, 'History'),
              listTileBuilder(Icons.info_outline, 'About the app'),
              listTileBuilder(Icons.account_circle, 'Logout'),
              listTileBuilder(Icons.exit_to_app, 'Exit'),
            ],
          ),
        ]),
      )
    ],
  ),
)

您可以在这张图片中清楚地看到问题

enter image description here

我正在为我的应用制作一个抽屉,并且它在列小部件中有2个容器,这些容器之间似乎有一条线破坏了外观,我已经尝试过用于上部容器了...

flutter flutter-layout
1个回答
0
投票

图像或堆栈中一定有东西

© www.soinside.com 2019 - 2024. All rights reserved.