Y
Y
YakutD2022-03-28 10:06:44
Android
YakutD, 2022-03-28 10:06:44

How to remove padding from top of ListTile in Drawer?

I can not remove the indent from the first ListTile in any way.
62415e09aa229371608269.jpeg

Here is the code:

Drawer(
      child: Container(
        padding: EdgeInsets.zero,
        child: Column(
        children: <Widget>[
          SizedBox(
            height: 88.0,
            width: 1000,
            child: DrawerHeader(
              decoration: BoxDecoration(
                color: Colors.blue,
              ),
              child: Text(
                'Настройки',
                style: TextStyle(
                    color: Colors.white,
                    fontSize: MainStyle.p.fontSize
                ),
              ),
            ),
          ),
          Expanded(
              child: Column(
                children: <Widget>[
                ListTile(
                  title:  Text(
                    'Язык',
                    style: TextStyle(
                        fontSize: MainStyle.p.fontSize
                    ),
                  ),
                  subtitle: Text(
                    "Русский",
                  ),
                  trailing: IconButton(
                    icon: Icon(Icons.edit),
                    color: Colors.black,
                    onPressed: () {

                    },
                  ),
                ),
                ListTile(
                  title:  Text(
                    'Выход',
                    style: TextStyle(
                        fontSize: MainStyle.p.fontSize
                    ),
                  ),
                  onTap: () {
                    exit();
                  },
                ),
              ],
            )
          ),
          Container(
              child: Align(
                  alignment: FractionalOffset.bottomCenter,
                  child: Column(
                    children: <Widget>[
                      ListTile(
                        title: Text(
                          globalState.version,
                          style: TextStyle(
                              fontSize: 15,
                              color: Colors.grey
                          ),
                          textAlign: TextAlign.center,
                        ),
                      ),
                    ],
                  )
              )
          ),
        ],
      ),
     )
    );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
YakutD, 2022-04-06
@YakutD

It is necessary to add the property margin for DrawerHeader : EdgeInsets.zero

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question