Kilo-Loco / 30DaysOfFlutter

214 stars 277 forks source link

The getter 'path' isn't defined for the type 'Uint8List'. #3

Open akashlilhare opened 3 years ago

akashlilhare commented 3 years ago

void _takeScreenshot() async {final imageFile = await _screenshotController.capture(); Share.shareFiles([imageFile.path]); }

when I try to call imagefile.the path then it gives me the following errro: The getter 'path' isn't defined for the type 'Uint8List'.

yurydemin commented 3 years ago

void _takeScreenshot() async {final imageFile = await _screenshotController.capture(); Share.shareFiles([imageFile.path]); }

when I try to call imagefile.the path then it gives me the following errro: The getter 'path' isn't defined for the type 'Uint8List'.

hello, captured image available in memory. You have to save it (to get path) or use it from memory (like Image.memory()). Look at the screenshot package readme and examples