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

outdated

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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:assets_generator_example/generated/images.asset.dart';
// Since 'Icons' is built-in class under material.dart, we can simple alias it as 'app_icons'
import 'package:assets_generator_example/generated/icons.asset.dart'
    as app_icons;

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(title: Text('Assets indexer Demo')),
        body: ListView(
          children: [
            Image.asset(Images.a),
            // Since 'Icons' is built-in class under material.dart, we can simple alias it as 'app_icons'
            Image.asset(app_icons.Icons.b)
          ],
        ),
      ),
    );
  }
}
17
likes
40
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

MIT (license)

Dependencies

build, mustache, numbers_to_words, path, quartet, yaml

More

Packages that depend on assets_indexer