Search code examples
flutterlayoutflutter-layout

How to increase the height of Network Image in Flutter?


How can i cange the height of my Network image,it is fixed and not changing,

This is the output

And this is the code.

Container(
      padding: const EdgeInsets.all(10),
      child: SingleChildScrollView(
        child: Column(
          children: [
            TextField(
              decoration: const InputDecoration(
                border: OutlineInputBorder(),
                labelText: 'Movie Title',
              ),
              controller: controller,
            ),
            const SizedBox(
              height: 20,
            ),
            Card(
              child: ListTile(
                leading: Image.network(
                  "https://m.media-amazon.com/images/M/MV5BMTExZmVjY2ItYTAzYi00MDdlLWFlOWItNTJhMDRjMzQ5ZGY0XkEyXkFqcGdeQXVyODIyOTEyMzY@._V1_SX300.jpg",
                  fit: BoxFit.cover,
                  width: 100,
                  height: 150,
                ),
              ),
            ),
          ],
        ),
      ),
    ),

thanks in advance!


Solution

  • If you go into ListTile, you will see that the leading's height and width const numbers are given. so you cannot change the height and width of the leading. You can use a SizedBox or Container instead of ListTile