spider 4.2.2 spider: ^4.2.2 copied to clipboard
A small dart command-line tool for generating dart references of assets from the assets folder.
Basic Example #
Just use following command:
spider build
Before
Widget build(BuildContext context) {
return Image(image: AssetImage('assets/background.png'));
}
After
Widget build(BuildContext context) {
return Image(image: AssetImage(Assets.background));
}
Generated Assets Class
class Assets {
static const String background = 'assets/background.png';
}