{"repo":"FlutterGen/flutter_gen","free":true,"listed":false,"github":"https://github.com/FlutterGen/flutter_gen","clone":"git clone https://github.com/FlutterGen/flutter_gen.git","description":"The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.","language":"Dart","stars":1579,"topics":["dart","flutter","code-generator","templates","assets","fonts","swiftgen","fluttergen"],"license":"MIT","category":"mobile-apps","readme_excerpt":"The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs. Inspired by SwiftGen. Motivation Using asset path string directly is not safe. ❌ Bad What would happen if you made a typo? ⭕️ Good We want to use it safely. Installation As a part of build runner 1. Add [build runner] and [FlutterGen] to your package's pubspec.yaml file: flutter gen runner now relies on post-process builders with build to: source , so build runner =2.12.0 is required. 2. Install [FlutterGen] 3. Use [FlutterGen] Pub workspaces FlutterGen also supports dart pub workspaces. Run build runner from the workspace root, and make sure each workspace member that should be built has resolution: workspace in its pubspec.yaml . FlutterGen will resolve each package from the active build target instead of the process working directory, so package-local pubspec.yaml configuration and output paths continue to work in workspace builds. If generated source files were removed manually while .dart tool/build is still present, run dart run build runner clean from the workspace root before running build --workspace again. The current post-process builder flow can re-materialize files reliably after a clean build, but a warm incremental build may skip unchanged manifests. For workspace builds, use Dart =3.7.0 together with build runner =2.12.0 . Pub Global Works with macOS, Linux and Windows. You might need to set up your path. Homebrew Works with macOS and Linux. asdf Works with macOS a","default_branch":null,"files":null,"tree":[],"storefront":"/r/FlutterGen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/FlutterGen/flutter_gen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}