sds_assets_gen 1.1.9 copy "sds_assets_gen: ^1.1.9" to clipboard
sds_assets_gen: ^1.1.9 copied to clipboard

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

sds_assets_gen #

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

Customized and apply for SDS, not for everyone.

Forked from "https://github.com/fluttercandies/assets_generator"

[]

Command for generate at SoftDreams:

sds_agen -f lib -t f -s -r uwu

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 sds_assets_gen #

dart pub global activate -s git http://10.100.140.19:7990/scm/mob/sds_assets_gen.git

Command #

Help

sds_agen -h

Demo

Dự án không sử dụng là Modules

sds_agen -s -t d --const-array --rule uwu --no-watch

Dự án sử dụng vừa là App vừa là Modules

sds_agen -s -t d --const-array --rule uwu --package --no-watch

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 "gp_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")
    --const-ignore    The regular to ignore some consts

Dart #

Work in Project

    Image.asset(Assets.assets_images_xxx_jpg);

Work in Modules

    Image.asset(
      Assets.assets_images_xxx_jpg,
      package: Assets.package,
    );
2
likes
140
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

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

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

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

More

Packages that depend on sds_assets_gen