flutter_native_screenshot: ^1.0.1 copied to clipboard
A Flutter plugin to take screenshot on Android & iOS.
A Flutter plugin to take screenshot on Android & iOS. This plugin also saved screenshot as image and return a path.
You must add
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Also you need to add a property to
application tag to fix an issue with permissions writing to
If don't add
<key>NSPhotoLibraryAddUsageDescription</key> <string>Take pretty screenshots and save it to the PhotoLibrary.</string>
info.plist file inside
ios/Runner directory, the application will crash.
Import the library:
and take a screenshot:
String path = await FlutterNativeScreenshot.takeScreenshot()
In error case the function returns
null and the screenshot path if success.