Flutter screenshot of a widget with RepaintBoundary

Published by Abhay Rastogi on

Flutter screenshot of a widget with RepaintBoundary

This blog covers taking a screenshot or converting widget into screenshot.there will be a scenario where we required to take a screenshot of image to store in media.

So, we will use RepaintBoundary widget as a parent widget of widgets we want to take screenshot off. RepaintBoundary needs to be specified with Global key.

Then we need to convert RepaintBoundary widget to Image so that i can be easily converted into image bite and get saved into the device.

This byte data need to be stored somewhere in device right! we will use image image_picker_save to store this.

Full code


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *