颤振抽屉,拉动抽屉后显示应用栏箭头

时间:2019-09-05 18:28:12

标签: flutter dart navigation drawer appbar

我使用endDrawer将抽屉添加到我的项目中,以便将其放置在右侧。当我拉抽屉时,会显示应用栏箭头,并将其他应用栏内容向右推。

已经搜索了一些线程。我使用Navigator.pushReplacement(...)进入仪表板。尝试将仪表板也设为主页,因为我认为这是一个导航功能,但无济于事 !

endDrawer: Drawer(
        child: ListView(
          padding: EdgeInsets.zero,
          children: <Widget>[
            Container(
              height: 300,
              child: DrawerHeader(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: <Widget>[
                    Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Image.asset(
                        "assets/avatar.png",
                        width: 90,
                      ),
                    ),
                    Padding(
                      padding: const EdgeInsets.all(5.0),
                      child: Text("Sample Name",
                          style: TextStyle(
                              fontSize: 20,
                              fontWeight: FontWeight.bold,
                              color: Colors.white)),
                    ),
                    Text("sample@mail.com",
                        style: TextStyle(fontSize: 16, color: Colors.white)),

                    // Text()
                  ],
                ),
                decoration: BoxDecoration(
                  color: Colors.blueAccent,
                ),
              ),
            ),
            ListTile(
              leading: Icon(Icons.info),
              title: Text('About'),
              onTap: () {
                // Update the state of the app
                // ...
                // Then close the drawer
                Navigator.pop(context);
              },
            ),
            ListTile(
              leading: Icon(Icons.lock),
              title: Text('Privacy Policy'),
              onTap: () {
                // Update the state of the app
                // ...
                // Then close the drawer
                Navigator.pop(context);
              },
            ),
          ],
        ),
      ),

我需要删除应用程序栏上显示的箭头

0 个答案:

没有答案