zeba_academy_media_tools 1.0.0 copy "zeba_academy_media_tools: ^1.0.0" to clipboard
zeba_academy_media_tools: ^1.0.0 copied to clipboard

A powerful Flutter media utility package for image compression, video compression, audio recording, video trimming, thumbnail generation, and image cropping.

šŸ“¦ zeba_academy_media_tools #

A powerful Flutter media utilities toolkit for handling images, videos, and audio in your apps.

zeba_academy_media_tools provides simple APIs to perform common media tasks such as:

  • šŸ“· Image picking and compression
  • āœ‚ļø Image cropping
  • šŸŽ¬ Video compression
  • šŸ–¼ Video thumbnail generation
  • šŸŽ¤ Audio recording utilities

This package helps developers quickly integrate media processing features without writing complex native code.


✨ Features #

  • šŸ“· Pick images from gallery or camera
  • āœ‚ļø Crop and compress images
  • šŸŽ¬ Compress videos to reduce file size
  • šŸ–¼ Generate thumbnails from videos
  • šŸŽ¤ Record audio using microphone
  • ⚔ Simple and clean API
  • šŸ“± Android & iOS support

šŸ“¦ Installation #

Add the package to your pubspec.yaml.

dependencies:
  zeba_academy_media_tools: ^1.0.0

Then run:

flutter pub get

šŸš€ Usage #

Import the package:

import 'package:zeba_academy_media_tools/zeba_academy_media_tools.dart';

šŸ“· Pick and Compress Image #

final image = await MediaTools.pickImage();

if (image != null) {
  final compressed = await MediaTools.cropAndCompressImage(image);
}

šŸŽ¬ Compress Video #

File videoFile = File("video_path");

final compressedVideo = await MediaTools.compressVideo(videoFile);

šŸ–¼ Generate Video Thumbnail #

final thumbnail = await MediaTools.generateVideoThumbnail(videoPath);

šŸŽ¤ Audio Recording #

Initialize recorder:

await MediaTools.initRecorder();

Start recording:

await MediaTools.startRecording("audio_file");

Stop recording:

final path = await MediaTools.stopRecording();

šŸ” Permissions #

Make sure you add the required permissions.

Android #

android/app/src/main/AndroidManifest.xml

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

iOS #

Add to ios/Runner/Info.plist:

NSMicrophoneUsageDescription
NSPhotoLibraryUsageDescription
NSCameraUsageDescription

šŸ“± Example #

A complete example application is included in the /example folder demonstrating:

  • Image compression
  • Video thumbnail generation
  • Video compression
  • Audio recording

šŸ¤ Contributing #

Contributions are welcome!

If you'd like to improve this package:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a pull request

šŸ“œ License #

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

You are free to:

  • Use
  • Modify
  • Distribute

But any distributed modifications must also be licensed under GPL-3.0.

See the LICENSE file for the full license text.


šŸ‘Øā€šŸ’» About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin


šŸš€ Your all-in-one no-bloat hub! #

šŸš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! šŸ’»āœØ

Zeba Academy is a learning platform dedicated to coding, technology, and development.

āž” Visit our main site: https://zeba.academy āž” Explore hands-on courses and resources at: https://code.zeba.academy āž” Check out our YouTube for more tutorials: https://www.youtube.com/@zeba.academy āž” Follow us on Instagram: https://www.instagram.com/zeba.academy/

Thank you for visiting!

0
likes
150
points
94
downloads
screenshot

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A powerful Flutter media utility package for image compression, video compression, audio recording, video trimming, thumbnail generation, and image cropping.

Homepage

License

GPL-3.0 (license)

Dependencies

flutter, flutter_sound, image_cropper, image_picker, path_provider, permission_handler, video_compress, video_thumbnail

More

Packages that depend on zeba_academy_media_tools