1 year ago

#222024

test-img

Roland Iordache

How to take a screenshot in Flutter of a widget bigger than the height of the mobile screen?

I am using an invisible widget StaggeredGridView which is bigger than the height of the emulator/mobile. The image is rendering only a part of it, I didn't find any answer relevant to this problem

  screenshotController
     .captureFromWidget(
       StaggeredGridView.count(
         crossAxisCount: 4,
         staggeredTiles: _staggeredTiles,
         children: _tiles,
       ),)
     .then((capturedImage) {
   // Handle captured image
   ImageGallerySaver.saveImage(
       Uint8List.fromList(capturedImage),
       quality: 90,
       name: "WomanVerseWallpaper");
 });

The screen which I want to take a screenshot of the widget (bigger than the screen, it continues) enter image description here

What I'm getting

enter image description here

flutter

screenshot

staggered-gridview

0 Answers

Your Answer

Accepted video resources