truvideo_image_sdk 1.0.1
truvideo_image_sdk: ^1.0.1 copied to clipboard
Offers advanced image editing tools, such as cropping, flipping, adding text, drawing, and rotating images for customized visual content.
Truvideo Image SDK #
This plugin integrates TruvideoImageSdk
for handling image files, including browsing, editing, and displaying images.
Supported Platforms #
- ✅ Android
- ✅ iOS
Features #
- Loads and displays images from a directory
- Edits images using the SDK
Requirements #
- TruvideoImageSdk Plugin
Setup #
- Add TruvideoImageSdk Plugin to your project.
- Install dependencies:
flutter pub get
- Ensure proper permissions in
AndroidManifest.xml
&Info.plist
. - Run the app:
flutter run
Usage #
- Load images from a directory:
List<String> getAllImagePathsInDirectory(String directoryPath) { final directory = Directory(directoryPath); List<String> imagePaths = []; if (directory.existsSync()) { directory.listSync(recursive: true).forEach((file) { if (file is File && ['png', 'jpeg', 'jpg'].contains(file.path.split('.').last.toLowerCase())) { imagePaths.add(file.path); } }); } return imagePaths; }
- Edit an image:
void editImage(String imagePath) async { TruvideoImageSdk.editImage( inputPath: imagePath, outputPath: imagePath, onResult: (String? result) { print("Image edited successfully: \$result"); }, onError: (String? message) { print("Image editing failed: \$message"); }, ); }
License #
MIT #
Support #
If you have any questions or suggestions regarding the SDK, please contact us at support@truvideo.com.