assetify
Type-safe asset constants generator for Flutter projects with a sleek CLI and watch mode.
What this package is like to depend on
Last release 1 years ago
21 Aug 2025
Too new to tell
only 1 release windows
Nearly every release is documented
notes for 3 of 3 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
3 releases · first in 2025
0 releases in the last 12 months
see the full history below
Release timeline
3 releases · Aug 2025 to Aug 2025Releases
latest 3-
1.0.221 Aug 2025Release notes
Open source →Changed
- Breaking: All generated asset constant and field names now include the file extension as a suffix (e.g.,
assetsImagesCatPng,catPng,logoSvg,likeAnimationJson). - This makes asset references unambiguous and matches user requests for extension-included naming.
- Updated tests and documentation to reflect this change.
- Breaking: All generated asset constant and field names now include the file extension as a suffix (e.g.,
-
1.0.118 Aug 2025Release notes
Open source →Added
- Comprehensive API documentation (dartdoc comments)
- Documentation for all public classes, methods, and properties
- Improved code examples in documentation
Changed
- Updated
mason_loggerdependency to^0.3.0for latest compatibility - Enhanced documentation coverage to meet pub.dev quality standards
Fixed
- Dependency constraints now support latest stable versions
- All public API elements now have proper documentation
-
1.0.018 Aug 2025Release notes
Open source →- Type-safe asset constant generation
- Clean naming without file extensions
- CLI with generate and watch commands
- Flutter helper extensions
- Comprehensive documentation and tests
Release notes
Open source →🎉 Initial public release of Assetify!
Added
-
Core Features
- Type-safe asset constant generation from
pubspec.yaml - Smart asset grouping by type (images, SVGs, Lottie, fonts, other)
- CLI with
generateandwatchcommands - Real-time asset watching and regeneration
- Type-safe asset constant generation from
-
Clean Naming System
- File extensions automatically removed from generated constant names
assetsLottieLikeAnimationinstead ofassetsLottieLikeAnimationJsonassetsImagesCatinstead ofassetsImagesCatPngassetsSvgLogoinstead ofassetsSvgLogoSvg
-
Documentation & Testing
- Comprehensive README with badges, examples, and troubleshooting
- Enhanced documentation with visual formatting
- Unit tests for utilities and generator
- GitHub Actions CI workflow
- Contributing guidelines
-
CLI Interface
- Type-safe asset constant generation from
pubspec.yaml - Smart asset grouping by type (images, SVGs, Lottie, fonts, other)
- CLI with
generateandwatchcommands - Real-time asset watching and regeneration
- Type-safe asset constant generation from
-
CLI Interface
dart run assetify:generate- Generate asset constants oncedart run assetify:watch- Watch mode for development- Configurable output path (
--output,-o) - Custom class naming (
--class-name,-c) - Verbose logging (
--verbose,-v) - Additional asset inclusion (
--assets)
-
Flutter Integration
- Optional Flutter widget helper extensions
- Automatic detection of
flutter_svgandlottiedependencies - Smart helper generation based on available packages
asImage(),asSvg(),asLottie()convenience methods
-
Smart Asset Detection
- Automatic asset type detection by file extension
- Support for images (PNG, JPG, GIF, WebP, etc.)
- SVG file detection and helpers
- Lottie animation detection (JSON files in animation folders)
- Font file inclusion from pubspec configuration
-
Developer Experience
- Interactive prompts when no assets are configured
- Pretty logging with progress indicators
- Automatic hidden file filtering (
.DS_Store,Thumbs.db) - Sensible defaults requiring minimal configuration
-
Code Generation
- Generates clean, documented Dart code
- Proper identifier sanitization and Dart keyword avoidance
- Both flat and nested asset access patterns
- Comprehensive ignore directives for generated code
-
Programmatic API
AssetGeneratorclass for custom toolingPubspecReaderfor configuration parsing- Extensible architecture for advanced use cases
Technical Details
-
Dependencies: Built on solid foundations
argsfor CLI argument parsingmason_loggerfor beautiful terminal outputwatcherfor file system monitoringyamlfor pubspec.yaml parsingpathfor cross-platform path handling
-
Platform Support
- Cross-platform compatibility (Windows, macOS, Linux)
- Flutter SDK 3.2.0+ support
- Null-safety enabled
-
Code Quality
- Comprehensive linting with
lintspackage - Ready for unit testing with
testpackage - Clean architecture with separated concerns
- Comprehensive linting with
Example Generated Output
class Assets { const Assets._(); static const String imagesCat = 'assets/images/cat.png'; static const Images images = Images._(); } extension AssetImageX on String { Image asImage({Key? key, BoxFit? fit}) => Image.asset(this, key: key, fit: fit); }Documentation
- Complete README with usage examples
- CLI reference documentation
- Programmatic API examples
- Troubleshooting guide
- Example Flutter app demonstrating all features
For more detailed information, see the README and documentation.