assetify 1.0.2 copy "assetify: ^1.0.2" to clipboard
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 and watch commands
    • Real-time asset watching and regeneration
  • Clean Naming System

    • File extensions automatically removed from generated constant names
    • assetsLottieLikeAnimation instead of assetsLottieLikeAnimationJson
    • assetsImagesCat instead of assetsImagesCatPng
    • assetsSvgLogo instead of assetsSvgLogoSvg
  • 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 and watch commands
    • Real-time asset watching and regeneration
  • CLI Interface

    • dart run assetify:generate - Generate asset constants once
    • dart 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 and lottie 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 tooling
    • PubspecReader for configuration parsing
    • Extensible architecture for advanced use cases

Technical Details #

  • Dependencies: Built on solid foundations

    • args for CLI argument parsing
    • mason_logger for beautiful terminal output
    • watcher for file system monitoring
    • yaml for pubspec.yaml parsing
    • path 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

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.

3
likes
160
points
230
downloads

Publisher

verified publisherionicerrrrscode.com

Weekly Downloads

Type-safe asset constants generator for Flutter projects with a sleek CLI and watch mode.

Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #assets #cli #codegen #productivity

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, mason_logger, path, yaml

More

Packages that depend on assetify