screenshot_plus

Last updated:

0 purchases

screenshot_plus Image
screenshot_plus Images
Add to Cart

Description:

screenshot plus

screenshot_plus #


















Screenshot Plus is a Dart package for taking screenshots on Android and iOS. This package provides a simple API to capture the current screen and save it as an image file in the device's storage.
The captured image can then be used for various purposes such as sharing, printing, or analyzing app behavior. The package is easy to use and integrates seamlessly with existing Flutter projects. This plugin saves the image and returns the path. Also working on almost all version of **Android** or **iOS**.





Instalation #
Run this command in terminal:
flutter pub add screenshot_plus
copied to clipboard
Or add this on pubspec.yaml file.
screenshot_plus:
copied to clipboard
Android #
You must grant Write permission on Storage
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
copied to clipboard
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"
copied to clipboard
iOS #
If don't add
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Take pretty screenshots and save it to the PhotoLibrary.</string>
copied to clipboard
to your info.plist file inside ios/Runner directory, the application will crash.
Use #
Import the library:
import 'package:screenshot_plus/screenshot_plus.dart';
copied to clipboard
and take a screenshot:
//Get the absolute path
String path = await ScreenshotPlus.takeShot();
debugPrint('Screenshot taken: $path');
copied to clipboard
In error case the function returns empty path to Show the captured image use this widget
//imageFilepath is the absolute File(path)
Image.file(imageFilepath)
copied to clipboard
🔗 Follow #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.