assets_generator 2.0.3 copy "assets_generator: ^2.0.3" to clipboard
assets_generator: ^2.0.3 copied to clipboard

outdated

The flutter tool to generate assets‘s configs(yaml) and consts automatically for single project and multiple modules.

assets_generator #

The flutter tool to generate assets‘s configs(yaml) and consts automatically for single project and multiple modules.

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Languages: English | 中文简体

Usage #

Environment #

you need to add pub bin path into your system path.

Platform Cache location
macOS or Linux $HOME/.pub-cache/bin
Windows* %APPDATA%\Pub\Cache\bin

pub global

Activate assets_generator #

pub global activate assets_generator

Command #

Help

agen -h

Demo

agen -t d -s -r lwu

All Commands

-h, --[no-]help     Help usage
-p, --path          Flutter project root path
                    (defaults to ".")
-f, --folder        The root folder of assets
                    (defaults to "assets")
-w, --[no-]watch    Whether continue to monitor the changes of assets
                    (defaults to on)
-t, --type          The type in pubsepec.yaml 
                    "d" means directory "- assets/images/" 
                    "f" means file      "- assets/images/xxx.jpg" 
                    (defaults to "d")
-s, --[no-]save     Whether save the arguments into the local
                    It will execute the local arguments if run "agen" without any arguments
-o, --out           The path of const Class
                    (defaults to "lib")
-r, --rule          The rule for the names of assets' consts
                    "lwu"(lowercase_with_underscores) : "assets_images_xxx_jpg" 
                    "uwu"(uppercase_with_underscores) : "ASSETS_IMAGES_XXX_JPG" 
                    "lcc"(lowerCamelCase)             : "assetsImagesXxxJpg" 
                    (defaults to "lwu")
-c, --class         The name of const Class
                    (defaults to "Assets")

Dart #

Work in Project

    Image.asset(Assets.assets_images_xxx_jpg);

Work in Modules

    Image.asset(
      Assets.assets_images_xxx_jpg,
      package: Assets.package,
    );
8
likes
0
pub points
65%
popularity

Publisher

verified publisherfluttercandies.com

The flutter tool to generate assets‘s configs(yaml) and consts automatically for single project and multiple modules.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, build_runner_core, dart_style, io, meta, path, yaml

More

Packages that depend on assets_generator