Thank Kilo Loco for the video. For those who are using the new Screenshot package you need to change the _takeScreenshot() function code to this : void _takeScreenshot() async { final uint8List = await screenshotController.capture(); String tempPath = (await getTemporaryDirectory()).path; File file = File('$tempPath/image.png'); await file.writeAsBytes(uint8List); await Share.shareFiles([file.path]); }
Breaking change to Screenshot (0.3.0 10/02/2021) . The capture method now returns Uint8List instead of File. If you want to follow along with the video exactly, you'll need fix the reference the previous version of the package, in the pubspec.yml to version 0.2.0 specifically (i.e. remove the ^ )
Hey there, Thanks for the video. When I try to share the image along with text on WhatsApp, the image does not get shared. If I try this messenger or any other service it works well. It even works well on android WhatsApp. Can you please provide a solution for this error?
How can we make an flutter app where one app can login only one device ; if user will add another account it won't sign in the app? Does it possible to do? If yes please help me out! #thankyourforthisawesometutorial #flutter #happycoding #awesometutorial #stayhealthy
This could probably be done by saving a unique value like the user ID to the keychain and checking that before allowing the user to sign it, but i dont think that would be a good user experience. Most big apps allow you to sign in to different accounts from the same device no problem
var imageuint = await screenshotController.capture(); var directory = (await getApplicationDocumentsDirectory()).path; File imgFile = new File('$directory/sfs.png');
Thank Kilo Loco for the video. For those who are using the new Screenshot package you need to change the _takeScreenshot() function code to this :
void _takeScreenshot() async {
final uint8List = await screenshotController.capture();
String tempPath = (await getTemporaryDirectory()).path;
File file = File('$tempPath/image.png');
await file.writeAsBytes(uint8List);
await Share.shareFiles([file.path]);
}
Thanks bro !
Thank so much bro. You saved my hours
what about getTemporaryDirectory, and image.png, and writeAsBytes, they are all showing errors
Thank you! Life saver.
@@runningsky Me too bro, did you find a solution for this?
Breaking change to Screenshot (0.3.0 10/02/2021) . The capture method now returns Uint8List instead of File. If you want to follow along with the video exactly, you'll need fix the reference the previous version of the package, in the pubspec.yml to version 0.2.0 specifically (i.e. remove the ^ )
Thanks for sharing
Hey @Ralph Shillington what is the solution for screenshot ^0.3.0
and for 030?
@@viveks. checkout my comment above if you haven't found any workaround
@@marcelhh5722 checkout my comment above if you haven't found any workaround
I just found your channel and I think it its amazing!!
Haha thanks!! Glad you like it!
It's very useful. I had been looking for these kind of stuff since 20 days almost.
can I use this on flutterflow?
Can we directly share screenshot without saving in directory from flutter web ?
Thank you, I am from Uzbekistan
Great! Just what I needed 🙏
Awesome! This is really helpful
newest solution will be
shareImage() async {
final uint8List = await screenshotController.capture();
String tempPath = (await getTemporaryDirectory()).path;
String fileName =" ";>>>>>your file name between ""
File file = await File('$tempPath/$fileName" }.png').create();
file.writeAsBytesSync(uint8List!);
await Share.shareFiles([file.path]);
}
How to add watermark on full screen capture with Flutter
This doesn't work for 0.3.0 version, how to handle saving and sharing SS with the latest version.
See my comment above
@@El-lj5pz Thank so much bro. I hope your comment will be upvoted.
path error, help please
Hey there,
Thanks for the video. When I try to share the image along with text on WhatsApp, the image does not get shared. If I try this messenger or any other service it works well. It even works well on android WhatsApp. Can you please provide a solution for this error?
Screenshot is not working with webview widget
How to make it work
Dont work more with 0.3.0 any solution?
if you find a solution, please share
Can we add watermark to screen shot
You're amazing 😊💙🙏
Thank you! 🙂
Sir, Do i need to have the screen open for taking the screenshot? Or can it be done in background?
Thank you. You always help.
anyone get problem with Screenshot on samsung device ? , it works only first time ,another device works fine
path error plz ans and give me solution
me too
what the answer
How can we make an flutter app where one app can login only one device ; if user will add another account it won't sign in the app?
Does it possible to do?
If yes please help me out!
#thankyourforthisawesometutorial #flutter #happycoding #awesometutorial #stayhealthy
This could probably be done by saving a unique value like the user ID to the keychain and checking that before allowing the user to sign it, but i dont think that would be a good user experience. Most big apps allow you to sign in to different accounts from the same device no problem
@@Kilo_Loco i think if one user have only one account in his/her phone that might be safe and less chance of misues!
var imageuint = await screenshotController.capture();
var directory = (await getApplicationDocumentsDirectory()).path;
File imgFile = new File('$directory/sfs.png');