asset_to_dart 0.1.0 copy "asset_to_dart: ^0.1.0" to clipboard
asset_to_dart: ^0.1.0 copied to clipboard

A CLI tool to auto-generate strongly typed Dart classes for Flutter assets. Supports all-in-one or per-folder output, filtering, and custom output paths.

Use this package as an executable

Install it

You can install the package from the command line:

dart pub global activate asset_to_dart

Use it

The package has the following executables:

$ asset_to_dart

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add asset_to_dart

With Flutter:

 $ flutter pub add asset_to_dart

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  asset_to_dart: ^0.1.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:asset_to_dart/app.dart';
import 'package:asset_to_dart/flutter_asset_gen.dart';
import 'package:asset_to_dart/functions/parse_assets_from_pubspec.dart';
import 'package:asset_to_dart/models/asset_config.dart';
0
likes
140
points
103
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to auto-generate strongly typed Dart classes for Flutter assets. Supports all-in-one or per-folder output, filtering, and custom output paths.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

args, yaml

More

Packages that depend on asset_to_dart