Safrid Bhuiyan
Safrid Bhuiyan

Reputation: 1

flutter drawer logo white underline

 drawer: Drawer(
        backgroundColor: Colors.grey[900],
        child: Column(
          children: [
            DrawerHeader(
              decoration: BoxDecoration(
                color: Colors.transparent, // Ensure background is consistent
             
             
             
              ),
              child: Image.asset(
                'lib/images/puma.png',
                color: Colors.white38,
                fit: BoxFit
                    .contain, // Ensure it fits the container without extra space
              ),
            ),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 50.0),
              child: Divider(
                color: Colors.grey[800],
                thickness: 2,
              ),
            ),
            // Other drawer items
          ],
        ),
      ),

i am having a issue on logo and divider there is a white divider under the logo which i am trying to remove but dont know how should i do it ,,,,

a code base solution

Upvotes: 0

Views: 36

Answers (1)

diksed
diksed

Reputation: 46

For this issue, I think you can use a Container widget instead of a DrawerHeader.

Column(
    children: [
      Container(
        margin: const EdgeInsets.only(bottom: 8.0),
        padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 8.0),
        child: Image.asset(
          'assets/1.png',
          fit: BoxFit.contain,
        ),
      ),
      Padding(
        padding: const EdgeInsets.symmetric(horizontal: 50.0),
        child: Divider(
          color: Colors.grey[800],
          thickness: 2,
        ),
      ),
    ],
  ),

The output of this code

You can achieve the desired appearance by changing the height value of the Container.

Upvotes: 0

Related Questions