flutter_native_screenshot 1.1.0 copy "flutter_native_screenshot: ^1.1.0" to clipboard
flutter_native_screenshot: ^1.1.0 copied to clipboard

outdated

A Flutter plugin to take screenshot on Android & iOS.

flutter_native_screenshot #

A Flutter plugin to take screenshot on Android & iOS. This plugin also saved screenshot as image and return a path.

Instalation #

Add

flutter_native_screenshot: ^<latest_version>

to your pubspec.yaml file.

Android #

You must add

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

to your AndroidManifest.xml inside android/src/main/ directory.

Also you need to add a property to application tag to fix an issue with permissions writing to EXTERNAL_STORAGE:

android:requestLegacyExternalStorage="true"

iOS #

If don't add

<key>NSPhotoLibraryAddUsageDescription</key>
<string>Take pretty screenshots and save it to the PhotoLibrary.</string>

to your info.plist file inside ios/Runner directory, the application will crash.

Use #

Import the library:

import 'package:flutter_native_screenshot/flutter_native_screenshot.dart';

and take a screenshot:

String path = await FlutterNativeScreenshot.takeScreenshot()

In error case the function returns null and the screenshot path if success.

10
likes
0
pub points
85%
popularity

Publisher

verified publishernusa.net.id

A Flutter plugin to take screenshot on Android & iOS.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_native_screenshot