zeba_academy_asset_optimizer 0.0.1
zeba_academy_asset_optimizer: ^0.0.1 copied to clipboard
Optimize Flutter assets with compression, unused detection, lazy loading, and size analysis.
zeba_academy_asset_optimizer #
๐ A powerful Flutter package to optimize your app assets with compression, unused detection, lazy loading, and size analysis.
โจ Features #
- ๐ผ๏ธ Image Compression (reduce asset size efficiently)
- ๐ Detect Unused Assets (clean your project)
- โก Lazy Loading (load assets only when needed)
- ๐ Asset Size Analysis (understand size distribution)
๐ฆ Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_asset_optimizer: ^0.0.1
Then run:
flutter pub get
๐ Usage #
๐ผ๏ธ Image Compression #
await ImageCompressor.compressImage(
inputPath: 'assets/image.png',
outputPath: 'assets/image_compressed.jpg',
quality: 70,
);
๐ Detect Unused Assets #
final unused = await UnusedAssetDetector.findUnusedAssets(
projectPath: './',
assetPaths: [
'assets/image.png',
'assets/logo.png',
],
);
โก Lazy Loading #
LazyAssetImage(
assetPath: 'assets/image.png',
);
๐ Asset Size Analysis #
final assets = await AssetSizeAnalyzer.analyze('assets/');
final total = AssetSizeAnalyzer.totalSize(assets);
๐งช Testing #
Run tests using:
flutter test
โ ๏ธ Limitations #
- Unused asset detection is string-based (may not be 100% accurate)
- Lazy loading is basic (not viewport-aware yet)
๐ฃ๏ธ Roadmap #
- WebP & advanced compression
- CLI support (
dart run optimize) - Build runner integration
- Viewport-aware lazy loading
- Advanced asset graph analysis
๐ License #
This project is licensed under the GNU General Public License v3.0.
๐จโ๐ป 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: zeba.academy
โก Explore hands-on courses and resources at: code.zeba.academy
โก Check out our YouTube for more tutorials: zeba.academy
โก Follow us on Instagram: zeba.academy
โญ Contributing #
Contributions are welcome! Feel free to open issues and pull requests.
โค๏ธ Support #
If you like this project, give it a โญ on GitHub and share it with others!