assetify 1.0.2
assetify: ^1.0.2 copied to clipboard
Type-safe asset constants generator for Flutter projects with a sleek CLI and watch mode.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.2 - 2025-08-22 #
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.
1.0.1 - 2025-08-18 #
Added #
- Comprehensive API documentation (dartdoc comments)
- Documentation for all public classes, methods, and properties
- Improved code examples in documentation
Changed #
- Updated
mason_logger
dependency to^0.3.0
for 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.0 - 2025-08-18 #
🎉 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
generate
andwatch
commands - Real-time asset watching and regeneration
- Type-safe asset constant generation from
-
Clean Naming System
- File extensions automatically removed from generated constant names
assetsLottieLikeAnimation
instead ofassetsLottieLikeAnimationJson
assetsImagesCat
instead ofassetsImagesCatPng
assetsSvgLogo
instead 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
generate
andwatch
commands - 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_svg
andlottie
dependencies - 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
AssetGenerator
class for custom toolingPubspecReader
for configuration parsing- Extensible architecture for advanced use cases
Technical Details #
-
Dependencies: Built on solid foundations
args
for CLI argument parsingmason_logger
for beautiful terminal outputwatcher
for file system monitoringyaml
for pubspec.yaml parsingpath
for 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
lints
package - Ready for unit testing with
test
package - 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.