Turns out I had to make the Screenshot controller local and put it here;
Widget createViewItem() {
ScreenshotController _screenshotController = ScreenshotController();
return Screenshot(
controller: screenshotController,
Column(
children: <Widget>[
child: Image.network( myavatar),
child: IconButton(
icon: Icon(Icons.share),
onPressed: () async {
await screenshotController.capture().then((image) async {
SocialShare.shareOptions("http://myurl", imagePath: image.path);
}
);
},
),
],
),
),
}
CLICK HERE to find out more related problems solutions.