79494306

Date: 2025-03-08 11:34:08
Score: 1
Natty:
Report link

I think this is a better way. You can control height and width as well.

Image.asset(
        'assets/images/background-img.png',
        width: 300, // Set desired width
        height: 300, // Set desired height
        fit: BoxFit.contain, // Adjust how the image fits the given space
      ),
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mohammedjafar Momin