flutter_gen
The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
5.15.0
107K downloads/mo
#1096 most downloaded on pub.dev
FlutterGen/flutter_gen
What this package is like to depend on
Last release 1 months ago
13 Jul 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 50 of 80 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
82 releases · first in 2020
6 releases in the last 12 months
see the full history below
Release timeline
82 releases · Aug 2020 to Jul 2026Releases
latest 60 of 82-
5.15.013 Jul 2026Release notes
Open source →🔖 5.15.0 (#773)
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Release notes
Open source →Feature
- #755 Use
abstract finalclass modifier for generated classes. by @RahmiTufanoglu
Fix
- #764 Add
xml 7.xsupport by wideningflutter_gen_core'sxmlconstraint to>=6.0.0 <8.0.0. by @Akhrameev
Development
- #757 Scope
GITHUB_TOKENto least privilege in the release workflow. - Fix tag glob in the
Release/Publishworkflows so pushing avMAJOR.MINOR.PATCH[+build|-pre]tag actually triggers them (previouspublish.ymlused regex syntax that GitHub Actions filter globs never matched). - Bump CI toolchain: Flutter
3.44.4, Node.js24.18.0, pnpm11.9.0,lint-stagedv17.
- #755 Use
-
5.14.127 Apr 2026Release notes
Open source →Development
- Fix package root resolution after build_runner 2.14.0 AOT changes. by @Carapacik
-
5.14.019 Apr 2026Release notes
Open source →Feature
- Add
build_runner --workspacesupport forflutter_gen_runnerusing a manifest + post-process materialization pipeline. - Add
fluttergen --workspacesupport to the command package, including package-localbuild.yamloverrides for each workspace member.
Development
- Document and align the minimum supported versions for the new build pipeline: Dart
>=3.7.0andbuild_runner >=2.12.0. - Document the current
build_runner --workspacerebuild limitation for manually deleted generated files and recommendbuild_runner cleanbefore rebuilding.
- Add
-
5.13.004 Mar 2026 -
5.13.0+109 Mar 2026 -
5.12.021 Sep 2025 -
5.11.017 Jul 2025Release notes
Open source →Feature
- #576 Add support for deferred components. by @ianmaciel
- #676 Add new option
parse_animationto parse metadata for animated images. by @HuanDu - #680 Add svg
ColorMapperto svg loader. by @sysint64 - #685 Use
.vecSVG class forvector_graphics_compilertransformed assets. by @Albert221 - #697 Refactor how generated files are being formatted. by @AlexV525
Development
Release notes
Open source →Feature
- #576 Add support for deferred components. by @ianmaciel
- #676 Add new option
parse_animationto parse metadata for animated images. by @HuanDu - #680 Add svg
ColorMapperto svg loader. by @sysint64 - #685 Use
.vecSVG class forvector_graphics_compilertransformed assets. by @Albert221 - #697 Refactor how generated files are being formatted. by @AlexV525
Development
-
5.10.002 Mar 2025Release notes
Open source →Feature
- #659 Add support Telegram Sticker
.tgsin Lottie Integration. by @dungngminh
Bug fix
- #653 Constraints
dart_styleto>=2.3.7. by @AlexV525 - #656 Add missing parameters in Lottie integration from lottie 3.0.0. by @dungngminh
- #658 Update required dart version. by @koji-1009
- #659 Add support Telegram Sticker
-
5.9.005 Feb 2025Release notes
Open source →Feature
- #587 Support Lottie ZIP archive files. by @AlexV525
- #599 Use
FilterQuality.mediumfor the image integration. by @AlexV525 - #615 Support
dart_stylev3. by @AlexV525 - #618 Remove Flare integration. by @AlexV525
- #619 Generate package path for directory. by @AlexV525
- #620 Format Dart files with the current Dart version instead of the latest supported. by @AlexV525
- #621 Adds
.lottiesupport. by @AlexV525 - #635 Support
archivev4. by @AlexV525 - #645 Allows not enable the image integration. by @AlexV525
Development
- #593 Better stdouts. by @AlexV525
- #622 Fix invalid codecov config. by @AlexV525
- #630 Update proper EOF. by @AlexV525
- #643 Improvements with code lints. by @AlexV525
- #644 Format code. by @AlexV525
Bug fix
Release notes
Open source →Feature
- #587 Support Lottie ZIP archive files. by @AlexV525
- #599 Use
FilterQuality.mediumfor the image integration. by @AlexV525 - #615 Support
dart_stylev3. by @AlexV525 - #618 Remove Flare integration. by @AlexV525
- #619 Generate package path for directory. by @AlexV525
- #620 Format Dart files with the current Dart version instead of the latest supported. by @AlexV525
- #621 Adds
.lottiesupport. by @AlexV525 - #635 Support
archivev4. by @AlexV525 - #645 Allows not enable the image integration. by @AlexV525
Development
- #593 Better stdouts. by @AlexV525
- #622 Fix invalid codecov config. by @AlexV525
- #630 Update proper EOF. by @AlexV525
- #643 Improvements with code lints. by @AlexV525
- #644 Format code. by @AlexV525
Bug fix
-
5.8.008 Oct 2024Release notes
Open source →Feature
- #555 Support build.yaml to configure. by @b2nkuu
- #567 Generate the
packageconstant for generated font classes. by @TesteurManiak - #569 Enables
gaplessPlaybackby default for image assets. by @AlexV525 - #580 Allows
mime: '>=1.0.0 <3.0.0'. by @AlexV525
Development
Release notes
Open source →Feature
- #555 Support build.yaml to configure. by @b2nkuu
- #567 Generate the
packageconstant for generated font classes. by @TesteurManiak - #569 Enables
gaplessPlaybackby default for image assets. by @AlexV525 - #580 Allows
mime: '>=1.0.0 <3.0.0'. by @AlexV525
Development
-
5.7.028 Aug 2024Release notes
Open source → -
5.6.025 Jun 2024 -
5.5.0+120 May 2024Release notes
Open source →Feature
- #471 Handles root directory assets. by @AlexV525
- #472 Add directory_path_enabled to output the path of assets directory classes. by @AlexV525
- #487 Add support for 'useArtboardSize' argument in rive integration. by @devilbuddy
- #493 Add support for vector graphics (vec files) in SvgGenImage. by @raldhafiri
Bug fix
Development
- Update to Dart 3.3.4.
- Update to Flutter 3.19.6.
-
5.4.005 Jan 2024 -
5.3.221 Sep 2023Release notes
Open source →Bug fix
- #409 Update dependencies.
- Update Dart SDK to
>=2.17.0 <4.0.0.
- Update Dart SDK to
Development
- Update to Dart 3.1.2.
- Update to Flutter 3.13.5.
Team
- Welcome @AlexV525 🎉
- #409 Update dependencies.
-
5.3.105 May 2023 -
5.3.018 Apr 2023Release notes
Open source →Feature
Bug fix
- #396 Fix
flutter_svg>=2.0.4requires a non-nullclipBehaviorfield. @jetpeter @hasanmhallak
Development
- #380 Migrate to melos v3. @blaugold @jfacoustic
- Update Dart SDK to
>=2.17.0 <3.0.0.
- #396 Fix
-
5.2.007 Feb 2023Release notes
Open source →Feature
- #350 [BREAKING CHANGES] Upgrade for support of
flutter_svg 2.0.0.
- #350 [BREAKING CHANGES] Upgrade for support of
-
5.1.031 Oct 2022Release notes
Open source → -
5.1.0+131 Oct 2022Nothing published for this version
-
5.0.320 Oct 2022 -
5.0.212 Oct 2022 -
5.0.129 Sep 2022Release notes
Open source →Bug fix
- #300 Fix
package_parameter_enabledbeing ignored for Flare, Rive and Lottie. - #303 Add
ignore_for_file: implicit_dynamic_list_literalto generated files.
Development
- #306 Update required
analyzer: '>=4.7.0 <6.0.0'
- #300 Fix
-
5.0.028 Sep 2022Release notes
Open source →Feature
-
#285 #298 Add Lottie files integration.
// Assets.lottie.hamburgerArrow.lottie() SizedBox( width: 200, height: 200, child: Assets.lottie.hamburgerArrow.lottie( fit: BoxFit.contain, ), ), -
#286 Allow users to change generated class name for assets, fonts, and colors.
flutter_gen: assets: # Optional outputs: class_name: MyAssets # Default is `Assets` fonts: # Optional outputs: class_name: MyFontFamily # Default is `FontFamily` colors: # Optional outputs: class_name: MyColorName # Default is `ColorName` -
#291 Add values list to generated classes for each directory.
Assets.images.values // <List<AssetGenImage>>[chip1, chip2, logo, profileJpg, profilePng]; -
#292 Support an ImageProvider.
// Assets.images.chip.provider() Container( height: 400, decoration: BoxDecoration( image: DecorationImage( image: Assets.images.chip.provider(), ), ), child: const Center(child: Text('Deco')), ), -
#294 [BREAKING CHANGES] Moved the
styleandpackage_parameter_enabledto under assets.outputs scope.# ❌ Before flutter_gen: # ... assets: package_parameter_enabled: true style: snake-case outputs: class_name: MyAssets # ⭕️ After flutter_gen: # ... assets: outputs: class_name: MyAssets package_parameter_enabled: true style: snake-case
Bug fix
- #287 Delete the generated files then flutter_gen won't generate files again
- #dart-lang/build#3364 Aggregate builder not rebuild when one of multiple output files is deleted.
-
-
4.3.009 Jun 2022Release notes
Open source → -
4.2.130 May 2022Release notes
Open source →Bug fix
- #236 The crypto package 3.0.2 conflict in flutter_gen_runner 4.2.0 with integration_test.
-
4.2.1+107 Jun 2022Nothing published for this version
-
4.2.025 May 2022Release notes
Open source →Feature
-
#208 Add scale and opacity parameters to Image().
-
#221 Support for build_runner watch.
-
#227 Maintenance for Flutter3 (flutter_lints to 2.0.1).
-
#229 Removed the AssetImage inheritance from AssetGenImage.
- Extending package information to asset types other than AssetGenImage.
- Added 'gen_for_package:true/false' param to support asset generation for a package.
// Before Widget build(BuildContext context) { return Image(image: Assets.images.chip); // Can't use this. } // After Widget build(BuildContext context) { return Assets.images.chip.image(); }- Added example_resource package for how to use another package resources from an app.
# file: example_resources/pubspec.yaml # ... flutter_gen: # ... assets: enabled: true package_parameter_enabled: true #... -
#230 Add coverage ignore comment on generated file headers.
-
Update collection to 1.16.0.
-
Update min dart sdk to >=2.14.0 <3.0.0.
Development
- Update to Dart 2.17.1
- Update to Flutter 3.0.1
-
-
4.1.607 Mar 2022Release notes
Open source → -
4.1.6+106 Jun 2022Nothing published for this version
-
4.1.513 Jan 2022 -
4.1.404 Jan 2022 -
4.1.314 Dec 2021Release notes
Open source → -
4.1.205 Nov 2021Release notes
Open source →Bug fix
- #156 The Dartdocs generate different strings on Windows and Ubuntu.
-
4.1.2+109 Dec 2021 -
4.1.2+209 Dec 2021Nothing published for this version
-
4.1.029 Oct 2021Release notes
Open source →Feature
- #138 Generate dartdoc as follows.
/// File path: pictures/chip5.jpg AssetGenImage get chip5 => const AssetGenImage('pictures/chip5.jpg'); /// Color: #979797 static const Color gray410 = Color(0xFF979797); - #143 Support Rive files type.
flutter_gen: integrations: rive: true - #150 Added the --version option for command-line.
Bug fix% fluttergen --version FlutterGen v4.1.0 - #134 Added the ability to support the at symbol (@) in file names.
DevelopmentAssetGenImage get logo2x => const AssetGenImage('assets/images/[email protected]'); - Update to Dart 2.14.4.
- Update to Flutter 2.5.3.
- Replace to renovate.
- #138 Generate dartdoc as follows.
-
4.0.121 Oct 2021 -
4.0.030 Sep 2021Release notes
Open source →Features
- [BREAKING] Ended support for Non null safety codes.
- Use for
line_lengthinstead oflineLength.
Development
- Replace to Melos.
- Add VSCode setting.
-
3.1.217 Aug 2021Release notes
Open source →-
#117 Update to analyzer 2.0.0. flutter_gen_runner (flutter_gen_core) 3.1.2 -> analyzer 2.0.0 workaround
dependency_overrides: meta: ^1.7.0 -
#110 Replace null safety dart style package.
-
-
3.1.108 Apr 2021Release notes
Open source →Features & Bug fix
- #103 Add option packageParameterEnabled to control whether to generate package parameter for assets or not.
-
3.1.007 Apr 2021 -
3.0.217 Mar 2021Nothing published for this version
-
3.0.117 Mar 2021Nothing published for this version
-
2.0.312 Mar 2021Nothing published for this version
-
2.0.208 Mar 2021Nothing published for this version
-
2.0.127 Feb 2021 -
2.0.1-dev.127 Feb 2021 pre-releaseNothing published for this version
-
2.0.1-dev.027 Feb 2021 pre-releaseNothing published for this version
-
2.0.020 Feb 2021Release notes
Open source →New Feature
-
[BREAKING CHANGE] #49 #53 Name collision with flutter localization when using build_runner
# Before # dev_dependencies: # flutter_gen: 1.3.1 # After dev_dependencies: flutter_gen_runner: ^2.0.0 -
#74 Doesn't generate assets.gen.dart when there are no assets
flutter_gen: fonts: enabled: false -
#59 Handling duplicate file names
// generated codes static const AssetGenImage imagesProfileJpg = AssetGenImage('assets/images/profile.jpg'); static const AssetGenImage imagesProfilePng = AssetGenImage('assets/images/profile.png');
Bug fix
- #75 Null safety support for generated files
-
-
1.3.126 Nov 2020 -
1.3.024 Nov 2020Release notes
Open source →New Feature
- #46 Added support for unknown mime type files.
- Added support for Rive (previously Flare) files.
-
1.2.214 Nov 2020 -
1.2.126 Sep 2020 -
1.2.021 Sep 2020 -
1.1.011 Sep 2020Release notes
Open source →New Feature
- #33 Support to generate flat hierarchy assets with field name style:
- camel-case
- snake-case
- dot-delimiter (Default)
- #33 Support to generate flat hierarchy assets with field name style:
-
1.0.309 Sep 2020 -
1.0.209 Sep 2020 -
1.0.108 Sep 2020 -
1.0.007 Sep 2020Release notes
Open source →Initial release.
-
Assets generator
- Supported image type.
- Supported SVG as an integration.
- And others.
-
Fonts generator
-
Colors generator
- Supported xml file.
- MaterialColor
- Supported xml file.
-