mek_assets 3.0.0-dev.5
mek_assets: ^3.0.0-dev.5 copied to clipboard
Automatically generate dart classes / flutter pubspec entries for your assets files.
Examples #
This directory contains examples of how to use the mek_assets package.
Default #
The default example shows the default behavior of the package when run as a script. It generates classes for each asset directory and a main class for single assets.
pubspec.yaml: Thepubspec.yamlfile with the assets configuration.lib/assets.dart: The generated class for single assets.lib/images.dart: The generated class for theassets/images/directory.
Custom #
The custom example shows how to customize the code generation by adding a mek_assets section to your pubspec.yaml file.
pubspec.yaml: Thepubspec.yamlfile with the assets andmek_assetsconfiguration.lib/assets/r.g.dart: The generated file with the custom configuration.
Build Runner #
The build_runner example shows how to use the package with build_runner.
pubspec.yaml: Thepubspec.yamlfile with thebuild_runnerandmek_assetsdependencies.build.yaml: Thebuild.yamlfile with themek_assetsconfiguration.lib/assets.dart: The generated file.