Search code examples
flutterflutter-image

How can I improve image display quality?


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?


Solution

  • 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,
        ),
      ),
    )