mek_assets 0.0.1 copy "mek_assets: ^0.0.1" to clipboard
mek_assets: ^0.0.1 copied to clipboard

outdated

Automatically generate dart classes / flutter pubspec entries for your assets files.

Mek Assets #

Automatically generate dart classes / flutter pubspec entries for your assets files.

Usage #

  1. Activate: dart/flutter pub global activate mek_assets

  2. Create mek_assets.yaml file or add in your pubspec.yaml file:

mek_assets:
  # It supports generating assets in a `single` class or splitting assets into `multi` classes based on directory
  format: multi # single, multi
  # The various assets groups
  groups:
    # Path of assets
    - input_dir: assets
  1. Optional: Add these comments to pubspec.yaml to automatically generate all the entries needed to flutter
flutter:
  assets:
    - ...
    # mek_assets GENERATED CODE - DO NOT MODIFY BY HAND
    - The auto generated code will be added here, copy paste this section
    # mek_assets
  1. You can generate index files with: <dart|flutter> pub global run mek_assets build

Advance and Package Usage #

index_generator:
  # The page width uses when the dart code is generated
  pageWidth: 80
  # Add the package name to the paths of the assets
  package: awesome_assets

  groups:
    - input_dir: assets
      # You can define specific filters for this assets group
      include:
        # You can define specific export assets files
        - '**.png'
      # Name of the main class that contains the assets. Defaults `R`
      className: AwesomeAssets
      # Directory where to save the generated files. Defaults `lib`
      output_dir: lib/src

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Extra #

  • index_generator: Automatically generate index / barrel files with all the exports needed for your library.
  • mek_data_class: Generate hashCode, ==, toString, copyWith and change methods with low code.
2
likes
0
points
99
downloads

Publisher

unverified uploader

Weekly Downloads

Automatically generate dart classes / flutter pubspec entries for your assets files.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, checked_yaml, cli_util, code_builder, dart_style, file, glob, json_annotation, mek_data_class, path, pure_extensions, yaml

More

Packages that depend on mek_assets