1

Original image

Screenshot

When I try to load an image in my application, it feels like it is somehow not stretching properly. I tried all the options for the "fit" parameter And nothing happened

It's my code

SingleChildScrollView(
  child: Container(
    width: width,
    child: Image.network(
      'https://img4.manga-chan.me/manga/-9new/t/1568958338_the-gamer-tom-4-glava-290/001.png',
      filterQuality: FilterQuality.high,
      fit: BoxFit.cover,
    ),
  ),
)

What should I do to make the image of original quality?

MadLax
  • 1,149
  • 3
  • 10
  • 13

1 Answers1

-2

Did it and it helped me

Wrapped scroll in container

double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;

Container(
  width: width,
  height: height,
  child: SingleChildScrollView(
    child: Image.network(
      'https://img4.manga-chan.me/manga/-9new/t/1571807955_the-gamer-tom-4-glava-296/002.png',
      filterQuality: FilterQuality.high,
      fit: BoxFit.fitWidth,
    ),
  ),
)
MadLax
  • 1,149
  • 3
  • 10
  • 13
  • @JoãoSoares I put the scroll in the container and assigned it a fixed screen width and height. After that, the image inside the scroll began to stretch correctly. – MadLax Jan 04 '20 at 08:05
  • Ah. So it wasn't actually a problem of image quality, it was how you had defined the sizing. Your question and answer are a bit misleading. – J. S. Jan 04 '20 at 14:29