assets_indexer 0.0.4 copy "assets_indexer: ^0.0.4" to clipboard
assets_indexer: ^0.0.4 copied to clipboard

outdated

To generate indexed constants for your assets in dart/flutter project! Inspired by android R.java concept

assets_indexer #

To generate indexed constants for your assets in dart/flutter project! Inspired by android R.java concept

Installation #

dev_dependencies:
  assets_indexer: <latest-version>

also, don't forget to add

dev_dependencies:
  build_runner:

Usage #

flutter packages pub run build_runner build

Output #

you can find your generated assets classes in lib/generated/<asset_dir_name>.asset.dart

Example usage #

import 'package:example_app/generated/images.dart';
import 'package:flutter/material.dart';

class Home extends StatelessWidget{

    @override
    Widget build(BuildContext context){
        return Scaffold(
            body: Center(
                child: Image.asset(Images.icon,width: 100)
            )
        )
    }
}
17
likes
0
pub points
0%
popularity

Publisher

verified publisherishaqhassan.com

To generate indexed constants for your assets in dart/flutter project! Inspired by android R.java concept

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

build, mustache, numbers_to_words, path, quartet, yaml

More

Packages that depend on assets_indexer