Cannot resize image in the navigation menu DrawerHeader

I have a left side menu bar in my Flutter app, and the header of the menu has an image. I need to resize this image. No matter what I do right now, I’m not able to resize.

I tried a number of different things but finally give up, I even tried the ResizeImage class but that does not work either.

The start of my code is shown below and the bold area is where the image is which I cannot resize so far, any help sincerely appreciated.

class NavDrawer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final mockWorks = MockWork.fetchAll();
    return Drawer(
      child: ListView(
        padding: EdgeInsets.zero,
        children: <Widget>[
          DrawerHeader(
            decoration: BoxDecoration(
                color: Colors.blue,
                image: DecorationImage(
                    fit: BoxFit.none,
                    **image: AssetImage('assets/images/logo_circle.png'),**
                ),
            ),
          ),

Managed to fix this on my own, basically just added a container to the DrawerHeader and voila! Here is the code in case anyone needs:

DrawerHeader(
              **child: Container(**
                height: 20,
                width: 20,
                decoration: BoxDecoration(
                  color: Colors.blue,
                  image: DecorationImage(
                    fit: BoxFit.contain,
                    image: AssetImage('assets/images/snatch_logo_circle.png'),
                  ),
                ),
              ),
            ),
2 Likes