fsa 0.0.1
fsa: ^0.0.1 copied to clipboard
Flutter Smart Assets - CLI tool that auto-scans assets/fonts and generates strongly-typed Dart constants with auto-updated pubspec.yaml
🚀 F S A • Flutter Smart Assets #
FSA (Flutter Smart Assets) is a lightweight CLI tool that automatically scans your Flutter project's assets and fonts directories, then:
✅ Updates your pubspec.yaml with proper indentation
✅ Generates a strongly-typed app_assets.dart file
✅ Uses UPPERCASE constants with format suffixes intact (e.g. LOGO_PNG)
✅ Includes summary comments at the top of generated files
✅ Credits format: Name + GitHub Link
📦 Installation #
dart pub global activate fsa
Make sure the global bin is in your PATH.
⚡ Usage #
fsa generate
This will:
- Scan all files in
assets/andfonts/ - Update
pubspec.yaml → flutter: assets:(with 2-space indentation) - Generate
lib/app_assets.dartlike:
// AUTO-GENERATED BY FSA — DO NOT EDIT.
// Author: Ayoigbala Soares - https://github.com/hermes13002
class AppAssets {
static const LOGO_PNG = "assets/logo.png";
static const ICON_SVG = "assets/icon.svg";
}
🔧 Example Workflow #
fsa generate
# ✅ Assets scanned
# ✅ pubspec.yaml updated
# ✅ app_assets.dart created
📜 License #
BSD 3-clause license
Author: Ayoigbala Soares — https://github.com/hermes13002