# flutter_gen_runner 5.15.0

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'flutter_gen_runner:5.15.0'
```
Published: 2026-07-13T16:59:34.119165Z
Expected archive SHA-256: 2b0fff517a75a14ed2eff749c1da2d6b8b568e542ad2b1c967356669a4c29bb2

Available in cache; verification: upstream_checksum
## Direct dependencies
- build: ^4.0.0
- build_config: ^1.1.2
- collection: ^1.17.0
- crypto: ^3.0.0
- flutter_gen_core: 5.15.0
- glob: ^2.0.0
- package_config: ^2.1.0
- path: ^1.8.0
- yaml: ^3.0.0

## Package README (untrusted upstream documentation)
<p align="center">
  <a href="https://pub.dev/packages/flutter_gen">
    <img src="https://github.com/FlutterGen/flutter_gen/raw/main/art/logo.png" width="480px" alt="Logo"/>
  </a>
</p>
<p align="center">
  <a href="https://pub.dartlang.org/packages/flutter_gen">
    <img src="https://img.shields.io/pub/v/flutter_gen.svg" alt="Pub">
  </a>
  <a href="https://github.com/FlutterGen/flutter_gen/actions?query=workflow%3A%22Dart+CI%22">
    <img src="https://github.com/FlutterGen/flutter_gen/workflows/Build/badge.svg" alt="Build Status"/>
  </a>
  <a href="https://codecov.io/gh/FlutterGen/flutter_gen">
    <img src="https://codecov.io/gh/FlutterGen/flutter_gen/branch/main/graph/badge.svg" alt="Coverage"/>
  </a>
</p>

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.

Inspired by [SwiftGen](https://github.com/SwiftGen/SwiftGen).

## Motivation

Using asset path string directly is not safe.

```yaml
# pubspec.yaml
flutter:
  assets:
    - assets/images/profile.jpg
```

❌ **Bad**  
What would happen if you made a typo?

```dart
Widget build(BuildContext context) {
  return Image.asset('assets/images/profile.jpeg');
}

// The following assertion was thrown resolving an image codec:
// Unable to load asset: assets/images/profile.jpeg
```

⭕️ **Good**  
We want to use it safely.

```dart
Widget build(BuildContext context) {
  return Assets.images.profile.image();
}
```

## Installation

### As a part of build_runner

1. Add [build_runner] and [FlutterGen] to your package's pubspec.yaml file:

   ```yaml
   environment:
     sdk: ^3.7.0

   dev_dependencies:
     build_runner: ^2.12.0
     flutter_gen_runner:
   ```

   `flutter_gen_runner` now relies on post-process builders with
   `build_to: source`, so `build_runner >=2.12.0` is required.

2. Install [FlutterGen]

   ```sh
   flutter pub get
   ```

3. Use [FlutterGen]

   ```sh
   dart run build_runner build
   ```

#### Pub workspaces

FlutterGen also supports [`dart pub` workspaces](https://dart.dev/tools/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`.

```yaml
# workspace root pubspec.yaml
environment:
  sdk: ^3.7.0

workspace:
  - packages/app
```

```yaml
# packages/app/pubspec.yaml
name: app
resolution: workspace

dev_dependencies:
  flutter_gen_runner:
  build_runner: ^2.12.0
```

```sh
dart run build_runner build --workspace
```

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.

```sh
dart pub global activate flutter_gen
```

You might need to [set up your path](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path).

### Homebrew

Works with macOS and Linux.

```sh
brew install FlutterGen/tap/fluttergen
```

### asdf

Works with macOS and Linux.
asdf-fluttergen is compatible with [mise](https://mise.jdx.dev/).

```sh
# add plugin
asdf plugin add fluttergen
# or
asdf plugin add fluttergen https://github.com/FlutterGen/asdf-fluttergen.git

# install fluttergen
asdf install fluttergen latest
```

See also: [FlutterGen/asdf-fluttergen](https://github.com/FlutterGen/asdf-fluttergen)

### GitHub Actions

Works with macOS and Linux.

```yaml
- uses: FlutterGen/setup-fluttergen@v1
  with:
    version: ${{ fluttergen_version }}
```

See also: [FlutterGen/setup-fluttergen](https://github.com/FlutterGen/setup-fluttergen)

## Usage

Run `fluttergen` after the configuration [`pubspec.yaml`](https://dart.dev/tools/pub/pubspec).

```sh
fluttergen -h

fluttergen -c example/pubspec.yaml

fluttergen --workspace -c pubspec.yaml
```

Use `--workspace` to treat the config file as a workspace root pubspec and run
generation for each listed workspace member. Without `--workspace`, the command
generates for exactly one package.

When `--workspace` is enabled, the root `pubspec.yaml` is used only to discover
workspace members from its `workspace:` section. FlutterGen then switches to
each member package and loads that package's own `pubspec.yaml` and, if
present, its local `build.yaml`.

That means workspace-wide command execution behaves like this:

- Root `pubspec.yaml`: selects which packages to visit.
- Member `pubspec.yaml`: provides `flutter` and `flutter_gen` configuration.
- Member `build.yaml`: overrides generator options for that member only.

The `--build` option is only available in single-package mode. In workspace
mode, put any overrides in each package's local `build.yaml` instead.

## Configuration file

[FlutterGen] generates dart files based on the key **`flutter`** and **`flutter_gen`** of [`pubspec.yaml`](https://dart.dev/tools/pub/pubspec).  
Default configuration can be found [here](https://github.com/FlutterGen/flutter_gen/tree/main/packages/core/lib/settings/config_default.dart).

```yaml
# pubspec.yaml
# ...

flutter_gen:
  output: lib/gen/ # Optional (default: lib/gen/)
  # line_length: 80 # Optional

  # Optional
  integrations:
    image: true
    flutter_svg: true
    rive: true
    lottie: true

  colors:
    inputs:
      - assets/color/colors.xml

flutter:
  uses-material-design: true
  assets:
    - assets/images/

  fonts:
    - family: Raleway
      fonts:
        - asset: assets/fonts/Raleway-Regular.ttf
        - asset: assets/fonts/Raleway-Italic.ttf
          style: italic
```

### build.yaml

When using `build_runner`, you can also configure generator options in the
target `build.yaml`. These builder options are applied on top of the
`pubspec.yaml` configuration for the current target.

```yaml
# build.yaml
# ...

targets:
  $default:
    builders:
      flutter_gen_runner: # or flutter_gen
        options:
          output: lib/build_gen/ # Optional (default: lib/gen/)
          line_length: 120 # Optional
```

## Available Parsers

### Assets

Following the doc
[Adding assets and images#Specifying assets](https://flutter.dev/docs/development/ui/assets-and-images#specifying-assets)
to specify assets, then [FlutterGen] will generate related dart files.  
No other specific configuration is required.  
_Ignore duplicated._

```yaml
# pubspec.yaml
flutter:
  assets:
    - assets/images/
    - assets/images/chip3/chip.jpg
    - assets/images/chip4/chip.jpg
    - path: assets/images/icons/paint.svg
    - path: assets/images/icons/transformed.svg
      transformers:
        - package: vector_graphics_compiler
    - assets/images/icons/dart@test.svg
    - assets/json/fruits.json
    - assets/flare/Penguin.flr
    - assets/rive/vehicles.riv
    - pictures/ocean_view.jpg

  # Also include assets from deferred components
  # https://docs.flutter.dev/perf/deferred-components
  deferred-components:
    - name: myDeferredComponent
      assets:
        - assets/images/another_image.jps
        - assets/videos/a_large_video.mp4
```

These configurations will generate **`assets.gen.dart`** under the **`lib/gen/`** directory by default.

#### Flavored assets

Flutter supports
[Conditionally bundling assets based on flavor](https://docs.flutter.dev/deployment/flavors#conditionally-bundling-assets-based-on-flavor).
Assets are only available with flavors if specified.
`flutter_gen` will generate the specified `flavors` for assets regardless the current flavor.
The `flavors` field accessible though `.flavors`, for example:

```dart
print(MyAssets.images.chip4.flavors); // -> {'extern'}
```

#### Excluding generating for assets

You can specify `flutter_gen > assets > exclude` using `Glob` patterns to exclude particular assets.

```yaml
flutter_gen:
  assets:
    exclude:
      - folder-your-want-to-exclude/**
      - specified-asset.jpg
```

See more patterns with the `package:glob`.

#### Generate for packages

If you want to generate assets for a package,
use `package_parameter_enabled` under `flutter_gen > assets > outputs`.

```yaml
flutter_gen:
  assets:
    outputs:
      package_parameter_enabled: true # <- Add this line.
```

This would add the package constant to the generated class. For example:

```dart
class Assets {
  const Assets._();

  static const String package = 'test';

  static const $AssetsImagesGen images = $AssetsImagesGen();
  static const $AssetsUnknownGen unknown = $AssetsUnknownGen();
}
```

Then you can use assets with the package implicitly or explicitly:

```dart
// Implicit usage for `Image`/`SvgPicture`/`Lottie`.
Widget build(BuildContext context) {
  return Assets.images.icons.paint.svg(
    width: 120,
    height: 120,
  );
}
```

or

```dart
// Explicit usage for `Image`/`SvgPicture`/`Lottie`.
Widget build(BuildContext context) {
  return SvgPicture.asset(
    Assets.images.icons.paint.path,
    package: Assets.package,
    width: 120,
    height: 120,
  );
}
```

#### Generate directories path

If you want to generate the path of directories,
use `directory_path_enabled` under `flutter_gen > assets > outputs`.

```yaml
flutter_gen:
  assets:
    outputs:
      directory_path_enabled: true # <- Add this line.
```

This would add the `path` getter to the generated directory class. For example:

```dart
class $AssetsImagesGen {
  const $AssetsImagesGen();

  ///******///

  /// Directory path: assets/images
  String get path => 'assets/images';
}
```

#### Including additional metadata

At build time, additional metadata may be included in the generated class, by using the
`parse_metadata` option.

```yaml
flutter_gen:
  parse_metadata: true # <- Add this line (default: false)
```

For image based assets, a new nullable `size` field is added to the
generated class. For example:

```dart
AssetGenImage get logo => const AssetGenImage(
  'assets/images/logo.png',
  size: Size(209.0, 49.0),
);
```

Which can now be used at runtime without parsing the information from the actual asset.

```dart
Widget build(BuildContext context) {
  return Assets.images.logo.size!.width;
}
```

You can use `parse_animation` to generate more animation details.
It will automatically parse all animation information for GIF and WebP files,
including frames, duration, etc. As this option significantly increases generation time,
The option is disabled by default; enabling it will significantly increase the generation elapse.

```yaml
flutter_gen:
  images:
    parse_animation: true # <- Add this line (default: false)
    # This option implies parse_metadata: true when parsing images.
```

For GIF and WebP animation, several new nullable field is added to the
generated class. For example:

```dart
AssetGenImage get animated =>
  const AssetGenImage(
    'assets/images/animated.webp',
    size: Size(209.0, 49.0),
    isAnimation: true,
    duration: Duration(milliseconds: 1000),
    frames: 15,
  );
```

#### Usage Example

[FlutterGen] generates [Image](https://api.flutter.dev/flutter/widgets/Image-class.html) class if the asset is Flutter supported image format.

Example results of `assets/images/chip.jpg`:

- **`Assets.images.chip`** is an implementation of [`AssetImage class`](https://api.flutter.dev/flutter/painting/AssetImage-class.html).
- **`Assets.images.chip.image(...)`** returns [`Image class`](https://api.flutter.dev/flutter/widgets/Image-class.html).
- **`Assets.images.chip.provider(...)`** returns [`ImageProvider class`](https://api.flutter.dev/flutter/painting/ImageProvider-class.html).
- **`Assets.images.chip.path`** just returns the path string.
- **`Assets.images.chip.values`** just returns the values list.

```dart
Widget build(BuildContext context) {
  return Assets.images.chip.image();
}

Widget build(BuildContext context) {
  return Assets.images.chip.image(
    width: 120,
    height: 120,
    fit: BoxFit.scaleDown,
  );

Widget build(BuildContext context) {
  // Assets.images.chip.path = 'assets/images/chip3/chip3.jpg'
  return Image.asset(Assets.images.chip.path);
}

```

If you do not want to generate `AssetGenImage`, set `flutter_gen > integrations > image` to `false`.

```yaml
# pubspec.yaml
flutter_gen:
  integrations:
    image: false
```

If you are using SVG images with [flutter_svg](https://pub.dev/packages/flutter_svg) you can use the integration feature. This feature also supports using `vector_graphics_compiler` transformer and the produced code will use the `AssetBytesLoader` for such transformed assets.

```yaml
# pubspec.yaml
flutter_gen:
  integrations:
    flutter_svg: true

flutter:
  assets:
    - assets/images/icons/paint.svg
    - path: assets/images/icons/transformed.svg
      transformers:
        - package: vector_graphics_compiler
```

```dart
Widget build(BuildContext context) {
  return Assets.images.icons.paint.svg(
    width: 120,
    height: 120
  );
}
```

**Available Integrations**

| Packages                                            | File extension             | Setting             | Usage                                     |
| --------------------------------------------------- | -------------------------- | ------------------- | ----------------------------------------- |
| [flutter_svg](https://pub.dev/packages/flutter_svg) | .svg                       | `flutter_svg: true` | Assets.images.icons.paint.**svg()**       |
| [rive](https://pub.dev/packages/rive)               | .riv                       | `rive: true`        | Assets.rive.vehicles.**rive()**           |
| [lottie](https://pub.dev/packages/lottie)           | .json, .zip, .lottie, .tgs | `lottie: true`      | Assets.lottie.hamburgerArrow.**lottie()** |

**Note:** For [lottie](https://pub.dev/packages/lottie) integration with `.lottie` and `.tgs` files, you must add a custom decoder via `decoder` parameter, see [lottie's document](https://pub.dev/packages/lottie#telegram-stickers-tgs-and-dotlottie-lottie) for more information.

In other cases, the asset is generated as String class.

```dart
// If don't use the Integrations.
final svg = SvgPicture.asset(Assets.images.icons.paint);

final json = await rootBundle.loadString(Assets.json.fruits);
```

[FlutterGen] also support generating other style of `Assets` class:

```yaml
# pubspec.yaml
flutter_gen:
  assets:
    outputs:
      # Assets.imagesChip
      # style: camel-case

      # Assets.images_chip
      # style: snake-case

      # Assets.images.chip (default style)
      # style: dot-delimiter

flutter:
  assets:
    - assets/images/chip.png
```

The root directory will be omitted if it is either **`assets`** or **`asset`**.

```
assets/images/chip3/chip.jpg      => Assets.images.chip3.chip
assets/images/chip4/chip.jpg      => Assets.images.chip4.chip
assets/images/icons/paint.svg     => Assets.images.icons.paint
assets/images/icons/dart@test.svg => Assets.images.icons.dartTest
assets/json/fruits.json           => Assets.json.fruits
pictures/ocean_view.jpg           => Assets.pictures.oceanView
```

[Example of code generated by FlutterGen](https://github.com/FlutterGen/flutter_gen/blob/main/examples/example/lib/gen/assets.gen.dart)

### Fonts

Just follow the doc [Use a custom font](https://flutter.dev/docs/cookbook/design/fonts) to specify fonts, then [FlutterGen] will generate related dart files.  
No other specific configuration is required.  
_Ignore duplicated._

```yaml
# pubspec.yaml
flutter:
  fonts:
    - family: Raleway
      fonts:
        - asset: assets/fonts/Raleway-Regular.ttf
        - asset: assets/fonts/Raleway-Italic.ttf
          style: italic
    - family: RobotoMono
      fonts:
        - asset: assets/fonts/RobotoMono-Regular.ttf
        - asset: assets/fonts/RobotoMono-Bold.ttf
          weight: 700
```

These configurations will generate **`fonts.gen.dart`** under the **`lib/gen/`** directory by default.

#### Generate for packages

If you want to generate fonts for a package,
use `package_parameter_enabled` under `flutter_gen > fonts > outputs`.

```yaml
flutter_gen:
  fonts:
    outputs:
      package_parameter_enabled: true # <- Add this line.
```

This would add the package constant to the generated class. For example:

```dart
class Fonts {
  Fonts._();

  static const String package = 'test';

  static const String raleway = 'packages/$package/Raleway';
  static const String robotoMono = 'packages/$package/RobotoMono';
}
```

#### Usage Example

```dart
Text(
  'Hi there, I\'m FlutterGen',
  style: TextStyle(
    fontFamily: FontFamily.robotoMono,
    fontFamilyFallback: const [FontFamily.raleway],
  ),
)
```

[Example of code generated by FlutterGen](https://github.com/FlutterGen/flutter_gen/tree/main/examples/example/lib/gen/fonts.gen.dart)

### Colors

[FlutterGen] supports generating colors from [XML](examples/example/assets/color/colors.xml) format files.  
_Ignore duplicated._

```yaml
# pubspec.yaml
flutter_gen:
  colors:
    inputs:
      - assets/color/colors.xml
      - assets/color/colors2.xml
```

[FlutterGen] can generate a [Color](https://api.flutter.dev/flutter/material/Colors-class.html) class based on the `name` attribute and the color hex value.
If the element has the attribute `type`, then a specially color will be generated.

Currently supported special color types:

- [MaterialColor](https://api.flutter.dev/flutter/material/MaterialColor-class.html)
- [MaterialAccentColor](https://api.flutter.dev/flutter/material/MaterialAccentColor-class.html)

> Noticed that there is no official material color generation algorithm. The implementation is based on the [mcg](https://github.com/mbitson/mcg) project.

```xml
<color name="milk_tea">#F5CB84</color>
<color name="cinnamon" type="material">#955E1C</color>
<color name="yellow_ocher" type="material material-accent">#DF9527</color>
```

These configurations will generate **`colors.gen.dart`** under the **`lib/gen/`** directory by default.

#### Usage Example

```dart
Text(
  'Hi there, I\'m FlutterGen',
  style: TextStyle(
    color: ColorName.denim,
  ),
```

[Example of code generated by FlutterGen](https://github.com/FlutterGen/flutter_gen/tree/main/examples/example/lib/gen/colors.gen.dart)

## Credits

The material color generation implementation is based on [mcg](https://github.com/mbitson/mcg) and [TinyColor](https://github.com/bgrins/TinyColor).

## Issues

Please file [FlutterGen] specific issues, bugs, or feature requests in our [issue tracker](https://github.com/FlutterGen/flutter_gen/issues/new).

Plugin issues that are not specific to [FlutterGen] can be filed in the [Flutter issue tracker](https://github.com/flutter/flutter/issues/new).

### Known Issues

#### Bad State: No Element when using build_runner

If you get an error message like this:

```
[SEVERE] flutter_gen_runner:flutter_gen_runner on $package$:

Bad state: No element
[SEVERE] Failed after 16.0s
```

The you most likely have a customized `build.yaml` to configure the build runner. In that case, all you have to do is to add the `pubspec.yaml` as build source to your `build.yaml`

```yaml
targets:
  $default:
    sources:
      include:
        - pubspec.yaml # add this line
        - ...
```

See #268 for the corresponding issue discussion.

### Error with [internationalization](https://docs.flutter.dev/development/accessibility-and-localization/internationalization)

Please try to remove `generate: true` in your `pubspec.yaml` and disable `synthetic-package` in your `l10n.yaml` like:

```yaml
# pubspec.yaml
flutter:
  generate: true <--- ⚠️Remove this line⚠️
```

```yaml
# l10n.yaml
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
synthetic-package: false <--- ⚠️Add this line⚠️
```

## Contributing

**We are looking for co-developers.**

If you wish to contribute a change to any of the existing plugins in this repo,
please review our [contribution guide](https://github.com/FlutterGen/flutter_gen/blob/master/CONTRIBUTING.md)
and open a [pull request](https://github.com/FlutterGen/flutter_gen/pulls).

[build_runner]: https://pub.dev/packages/build_runner
[fluttergen]: https://pub.dev/packages/flutter_gen

## Changelog
## 5.15.0

**Feature**

- [#755](https://github.com/FlutterGen/flutter_gen/pull/755) Use `abstract final` class modifier for generated classes. by [@RahmiTufanoglu](https://github.com/RahmiTufanoglu)

**Fix**

- [#764](https://github.com/FlutterGen/flutter_gen/pull/764) Add `xml 7.x` support by widening `flutter_gen_core`'s `xml` constraint to `>=6.0.0 <8.0.0`. by [@Akhrameev](https://github.com/Akhrameev)

**Development**

- [#757](https://github.com/FlutterGen/flutter_gen/pull/757) Scope `GITHUB_TOKEN` to least privilege in the release workflow.
- Fix tag glob in the `Release` / `Publish` workflows so pushing a `vMAJOR.MINOR.PATCH[+build|-pre]` tag actually triggers them (previous `publish.yml` used regex syntax that GitHub Actions filter globs never matched).
- Bump CI toolchain: Flutter `3.44.4`, Node.js `24.18.0`, pnpm `11.9.0`, `lint-staged` `v17`.

## 5.14.1

**Development**

- Fix package root resolution after build_runner 2.14.0 AOT changes. by [@Carapacik](https://github.com/Carapacik)

## 5.14.0

**Feature**

- Add `build_runner --workspace` support for `flutter_gen_runner` using a manifest + post-process materialization pipeline.
- Add `fluttergen --workspace` support to the command package, including package-local `build.yaml` overrides for each workspace member.

**Development**

- Document and align the minimum supported versions for the new build pipeline: Dart `>=3.7.0` and `build_runner >=2.12.0`.
- Document the current `build_runner --workspace` rebuild limitation for manually deleted generated files and recommend `build_runner clean` before rebuilding.

## 5.13.0+1

**Development**

- Fixes version conflict between packages.

## 5.13.0

**Development**

- [#727](https://github.com/FlutterGen/flutter_gen/pull/727) Allow `rive 0.14.0`. by [@AlexV525](https://github.com/AlexV525)

## 5.12.0

**Development**

- [#707](https://github.com/FlutterGen/flutter_gen/pull/707) Allow `build 4.0.0`. by [@BetterB0y](https://github.com/BetterB0y)

## 5.11.0

**Feature**

- [#576](https://github.com/FlutterGen/flutter_gen/pull/576) Add support for deferred components. by [@ianmaciel](https://github.com/ianmaciel)
- [#676](https://github.com/FlutterGen/flutter_gen/pull/676) Add new option `parse_animation` to parse metadata for animated images. by [@HuanDu](https://github.com/huandu)
- [#680](https://github.com/FlutterGen/flutter_gen/pull/680) Add svg `ColorMapper` to svg loader. by [@sysint64](https://github.com/sysint64)
- [#685](https://github.com/FlutterGen/flutter_gen/pull/685) Use `.vec` SVG class for `vector_graphics_compiler` transformed assets. by [@Albert221](https://github.com/Albert221)
- [#697](https://github.com/FlutterGen/flutter_gen/pull/697) Refactor how generated files are being formatted. by [@AlexV525](https://github.com/AlexV525)

**Development**

- [#681](https://github.com/FlutterGen/flutter_gen/pull/682) Bump `dart_style` v3 which also requires Dart 3.4. by [@AlexV525](https://github.com/AlexV525)
- [#682](https://github.com/FlutterGen/flutter_gen/pull/682) Add Facts generate utils. by [@AlexV525](https://github.com/AlexV525)
- [#694](https://github.com/FlutterGen/flutter_gen/pull/694) Use fine-grained logger instead of `stdout.writeln`. by [@AlexV525](https://github.com/AlexV525)
- [#698](https://github.com/FlutterGen/flutter_gen/pull/698) Improve workflow with automatic formatting. by [@AlexV525](https://github.com/AlexV525)
- [#699](https://github.com/FlutterGen/flutter_gen/pull/699) Allow `build 3.0.0`. by [@davidmorgan](https://github.com/davidmorgan)

## 5.10.0

**Feature**

- [#659](https://github.com/FlutterGen/flutter_gen/pull/659) Add support Telegram Sticker `.tgs` in Lottie Integration. by [@dungngminh](https://github.com/dungngminh)

**Bug fix**

- [#653](https://github.com/FlutterGen/flutter_gen/pull/653) Constraints `dart_style` to `>=2.3.7`. by [@AlexV525](https://github.com/AlexV525)
- [#656](https://github.com/FlutterGen/flutter_gen/pull/656) Add missing parameters in Lottie integration from lottie 3.0.0. by [@dungngminh](https://github.com/dungngminh)
- [#658](https://github.com/FlutterGen/flutter_gen/pull/658) Update required dart version. by [@koji-1009](https://github.com/koji-1009)

## 5.9.0

**Feature**

- [#587](https://github.com/FlutterGen/flutter_gen/pull/587) Support Lottie ZIP archive files. by [@AlexV525](https://github.com/AlexV525)
- [#599](https://github.com/FlutterGen/flutter_gen/pull/599) Use `FilterQuality.medium` for the image integration. by [@AlexV525](https://github.com/AlexV525)
- [#615](https://github.com/FlutterGen/flutter_gen/pull/615) Support `dart_style` v3. by [@AlexV525](https://github.com/AlexV525)
- [#618](https://github.com/FlutterGen/flutter_gen/pull/618) Remove Flare integration. by [@AlexV525](https://github.com/AlexV525)
- [#619](https://github.com/FlutterGen/flutter_gen/pull/619) Generate package path for directory. by [@AlexV525](https://github.com/AlexV525)
- [#620](https://github.com/FlutterGen/flutter_gen/pull/620) Format Dart files with the current Dart version instead of the latest supported. by [@AlexV525](https://github.com/AlexV525)
- [#621](https://github.com/FlutterGen/flutter_gen/pull/621) Adds `.lottie` support. by [@AlexV525](https://github.com/AlexV525)
- [#635](https://github.com/FlutterGen/flutter_gen/pull/635) Support `archive` v4. by [@AlexV525](https://github.com/AlexV525)
- [#645](https://github.com/FlutterGen/flutter_gen/pull/645) Allows not enable the image integration. by [@AlexV525](https://github.com/AlexV525)

**Development**

- [#593](https://github.com/FlutterGen/flutter_gen/pull/593) Better stdouts. by [@AlexV525](https://github.com/AlexV525)
- [#622](https://github.com/FlutterGen/flutter_gen/pull/622) Fix invalid codecov config. by [@AlexV525](https://github.com/AlexV525)
- [#630](https://github.com/FlutterGen/flutter_gen/pull/630) Update proper EOF. by [@AlexV525](https://github.com/AlexV525)
- [#643](https://github.com/FlutterGen/flutter_gen/pull/643) Improvements with code lints. by [@AlexV525](https://github.com/AlexV525)
- [#644](https://github.com/FlutterGen/flutter_gen/pull/644) Format code. by [@AlexV525](https://github.com/AlexV525)

**Bug fix**

- [#592](https://github.com/FlutterGen/flutter_gen/pull/592) Accept both `flutter_gen` and `flutter_gen_runner` as the entry of build.yaml. by [@b2nkuu](https://github.com/b2nkuu)

## 5.8.0

**Feature**

- [#555](https://github.com/FlutterGen/flutter_gen/pull/555) Support build.yaml to configure. by [@b2nkuu](https://github.com/b2nkuu)
- [#567](https://github.com/FlutterGen/flutter_gen/pull/567) Generate the `package` constant for generated font classes. by [@TesteurManiak](https://github.com/TesteurManiak)
- [#569](https://github.com/FlutterGen/flutter_gen/pull/569) Enables `gaplessPlayback` by default for image assets. by [@AlexV525](https://github.com/AlexV525)
- [#580](https://github.com/FlutterGen/flutter_gen/pull/580) Allows `mime: '>=1.0.0 <3.0.0'`. by [@AlexV525](https://github.com/AlexV525)

**Development**

- [#563](https://github.com/FlutterGen/flutter_gen/pull/563) Fix concurrency execution with melos. by [@wasabeef](https://github.com/wasabeef)

## 5.7.0

**Feature**

- [#548](https://github.com/FlutterGen/flutter_gen/pull/548) Add Import abstraction for package imports alias. by [@AlexV525](https://github.com/AlexV525)

**Development**

- New releases [asdf-fluttergen](https://github.com/FlutterGen/asdf-fluttergen) and [setup-fluttergen](https://github.com/FlutterGen/setup-fluttergen). by [@ronnnnn](https://github.com/ronnnnn)

## 5.6.0

**Bug fix**

- [#530](https://github.com/FlutterGen/flutter_gen/pull/530) Fix the Flavored assets. by [@AlexV525](https://github.com/AlexV525)
- [#532](https://github.com/FlutterGen/flutter_gen/pull/532) Provide the theme to SvgAssetLoader instead of SvgPicture. by [@Kirpal](https://github.com/Kirpal)

## 5.5.0+1

**Feature**

- [#471](https://github.com/FlutterGen/flutter_gen/pull/471) Handles root directory assets. by [@AlexV525](https://github.com/AlexV525)
- [#472](https://github.com/FlutterGen/flutter_gen/pull/472) Add directory_path_enabled to output the path of assets directory classes. by [@AlexV525](https://github.com/AlexV525)
- [#487](https://github.com/FlutterGen/flutter_gen/pull/487) Add support for 'useArtboardSize' argument in rive integration. by [@devilbuddy](https://github.com/devilbuddy)
- [#493](https://github.com/FlutterGen/flutter_gen/pull/493) Add support for vector graphics (vec files) in SvgGenImage. by [@raldhafiri](https://github.com/raldhafiri)

**Bug fix**

- [#485](https://github.com/FlutterGen/flutter_gen/pull/485) Remove default SvgTheme argument preventing DefaultSvgTheme works correctly. by [@mym0404](https://github.com/mym0404)

**Development**

- Update to Dart 3.3.4.
- Update to Flutter 3.19.6.

## 5.4.0

**Feature**

- [#435](https://github.com/FlutterGen/flutter_gen/pull/435) Allowed the generated values statement to optionally be static. [@bramp](https://github.com/bramp)

**Bug fix**

- [#432](https://github.com/FlutterGen/flutter_gen/pull/432) Refactored the AssetGenImage code to be another Integration. [@bramp](https://github.com/bramp)

**Development**

- [#438](https://github.com/FlutterGen/flutter_gen/pull/438) Fix module configurations.
- Update to Dart 3.2.0.
- Update to Flutter 3.16.0.

## 5.3.2

**Bug fix**

- [#409](https://github.com/FlutterGen/flutter_gen/pull/409) Update dependencies.
  - Update Dart SDK to `>=2.17.0 <4.0.0`.

**Development**

- Update to Dart 3.1.2.
- Update to Flutter 3.13.5.

**Team**

- Welcome [@AlexV525](https://github.com/AlexV525) 🎉

## 5.3.1

**Bug fix**

- [#383](https://github.com/FlutterGen/flutter_gen/pull/383) Fix the wrong path for unknown mime types when `packageParameterEnabled` is enabled. [@blaugold](https://github.com/blaugold)

## 5.3.0

**Feature**

- [#361](https://github.com/FlutterGen/flutter_gen/pull/361) Add package parameter to generated asset provider method. [@orevial](https://github.com/orevial)

**Bug fix**

- [#396](https://github.com/FlutterGen/flutter_gen/pull/369) Fix `flutter_svg` `>=2.0.4` requires a non-null `clipBehavior` field. [@jetpeter](https://github.com/jetpeter) [@hasanmhallak](https://github.com/hasanmhallak)

**Development**

- [#380](https://github.com/FlutterGen/flutter_gen/pull/380) Migrate to melos v3. [@blaugold](https://github.com/blaugold) [@jfacoustic](https://github.com/jfacoustic)
- Update Dart SDK to `>=2.17.0 <3.0.0`.

## 5.2.0

**Feature**

- [#350](https://github.com/FlutterGen/flutter_gen/pull/350) [**BREAKING CHANGES**] Upgrade for support of `flutter_svg 2.0.0`.

## 5.1.0, 5.1.0+1

**Feature**

- [#322](https://github.com/FlutterGen/flutter_gen/issues/322) [#327](https://github.com/FlutterGen/flutter_gen/issues/327) [**BREAKING CHANGES**] Add keyName to integrations and exchange the `path` value.

## 5.0.3

**Bug fix**

- [#322](https://github.com/FlutterGen/flutter_gen/issues/322) Fix wrong package asset path with svg, lottie, flare and rive integrations.
- [#323](https://github.com/FlutterGen/flutter_gen/issues/323) Fix generate failed when only list in a JSON files.

## 5.0.2

**Bug fix**

- [#308](https://github.com/FlutterGen/flutter_gen/issues/308) [#309](https://github.com/FlutterGen/flutter_gen/pull/309) Fix missing add to the `lottie#controller`.

## 5.0.1

**Bug fix**

- [#300](https://github.com/FlutterGen/flutter_gen/pull/300) Fix `package_parameter_enabled` being ignored for Flare, Rive and Lottie.
- [#303](https://github.com/FlutterGen/flutter_gen/pull/303) Add `ignore_for_file: implicit_dynamic_list_literal` to generated files.

**Development**

- [#306](https://github.com/FlutterGen/flutter_gen/pull/306) Update required `analyzer: '>=4.7.0 <6.0.0'`

## 5.0.0

**Feature**

- [#285](https://github.com/FlutterGen/flutter_gen/pull/285) [#298](https://github.com/FlutterGen/flutter_gen/pull/298) Add Lottie files integration.
  ```dart
  // Assets.lottie.hamburgerArrow.lottie()
  SizedBox(
    width: 200,
    height: 200,
    child: Assets.lottie.hamburgerArrow.lottie(
      fit: BoxFit.contain,
    ),
  ),
  ```
- [#286](https://github.com/FlutterGen/flutter_gen/pull/286) Allow users to change generated class name for assets, fonts, and colors.

  ```yaml
  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](https://github.com/FlutterGen/flutter_gen/pull/291) Add values list to generated classes for each directory.
  ```dart
  Assets.images.values // <List<AssetGenImage>>[chip1, chip2, logo, profileJpg, profilePng];
  ```
- [#292](https://github.com/FlutterGen/flutter_gen/pull/292) Support an ImageProvider.

  ```dart
  // Assets.images.chip.provider()
  Container(
    height: 400,
    decoration: BoxDecoration(
      image: DecorationImage(
        image: Assets.images.chip.provider(),
      ),
    ),
    child: const Center(child: Text('Deco')),
  ),

  ```

- [#294](https://github.com/FlutterGen/flutter_gen/pull/294) [**BREAKING CHANGES**] Moved the `style` and `package_parameter_enabled` to under assets.outputs scope.

  ```yaml

  # ❌ 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 ](https://github.com/FlutterGen/flutter_gen/issues/287) Delete the generated files then flutter_gen won't generate files again
  - [#dart-lang/build#3364](https://github.com/dart-lang/build/issues/3364) Aggregate builder not rebuild when one of multiple output files is deleted.

## 4.3.0

**Feature**

- [#264](https://github.com/FlutterGen/flutter_gen/pull/264) Add `keyName` to asset generate file.
  - [#248](https://github.com/FlutterGen/flutter_gen/pull/248)
  - [#251](https://github.com/FlutterGen/flutter_gen/pull/251)

**Bug fix**

- [#247](https://github.com/FlutterGen/flutter_gen/pull/247) Make the default scale value null, so Flutter decides the one to use.

## 4.2.1, 4.2.1+1

**Bug fix**

- [#236](https://github.com/FlutterGen/flutter_gen/issues/236) The crypto package 3.0.2 conflict in flutter_gen_runner 4.2.0 with integration_test.

## 4.2.0

**Feature**

- [#208](https://github.com/FlutterGen/flutter_gen/pull/208) Add scale and opacity parameters to Image().
- [#221](https://github.com/FlutterGen/flutter_gen/pull/221) Support for build_runner watch.
- [#227](https://github.com/FlutterGen/flutter_gen/pull/227) Maintenance for Flutter3 (flutter_lints to 2.0.1).
- [#229](https://github.com/FlutterGen/flutter_gen/pull/229) Removed the AssetImage inheritance from AssetGenImage.
  - [Extending package information to asset types other than AssetGenImage.](https://github.com/FlutterGen/flutter_gen/pull/162)
  - [Added 'gen_for_package:true/false' param to support asset generation for a package.](https://github.com/FlutterGen/flutter_gen/pull/213)

  ```dart
  // 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.

  ```dart
  # file: example_resources/pubspec.yaml
  # ...
  flutter_gen:
    # ...
    assets:
      enabled: true
      package_parameter_enabled: true

  #...
  ```

- [#230](https://github.com/FlutterGen/flutter_gen/pull/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.6, 4.1.6+1

**Feature**

- [#199](https://github.com/FlutterGen/flutter_gen/pull/199) [#201](https://github.com/FlutterGen/flutter_gen/pull/201) Expose some parameters of SvgPicture (flutter_svg).
  - theme
  - cacheColorFilter

## 4.1.5

**Bug fix**

- [#187](https://github.com/FlutterGen/flutter_gen/issues/187) Update dependencies.
  - analyzer

## 4.1.4

**Feature**

- [#180](https://github.com/FlutterGen/flutter_gen/issues/180) [#182](https://github.com/FlutterGen/flutter_gen/pull/182) Update to dartx 1.0.0 and json_serializable to 6.0.0

**Development**

- Update to Dart 2.15.0
- Update to Flutter 2.8.1

## 4.1.3

**Bug fix**

- [#172](https://github.com/FlutterGen/flutter_gen/pull/172) [#173](https://github.com/FlutterGen/flutter_gen/pull/173) Add unnecessary_import in ignore_for_title because cause warning from Dart 2.15.

## 4.1.2+1, 4.1.2+2

**Development**

- Added sample code.

## 4.1.2

**Bug fix**

- [#156](https://github.com/FlutterGen/flutter_gen/pull/156) The Dartdocs generate different strings on Windows and Ubuntu.

## 4.1.0

**Feature**

- [#138](https://github.com/FlutterGen/flutter_gen/pull/138) Generate dartdoc as follows.
  ```dart
  /// File path: pictures/chip5.jpg
  AssetGenImage get chip5 => const AssetGenImage('pictures/chip5.jpg');
  /// Color: #979797
  static const Color gray410 = Color(0xFF979797);
  ```
- [#143](https://github.com/FlutterGen/flutter_gen/pull/143) Support [Rive](https://rive.app/) files type.
  ```yaml
  flutter_gen:
    integrations:
      rive: true
  ```
- [#150](https://github.com/FlutterGen/flutter_gen/pull/150) Added the --version option for command-line.
  ```shell
  % fluttergen --version
  FlutterGen v4.1.0
  ```
  **Bug fix**
- [#134](https://github.com/FlutterGen/flutter_gen/pull/134) Added the ability to support the at symbol (@) in file names.
  ```dart
  AssetGenImage get logo2x => const AssetGenImage('assets/images/logo@2x.png');
  ```
  **Development**
- Update to Dart 2.14.4.
- Update to Flutter 2.5.3.
- Replace to renovate.

## 4.0.1

**Bug fix**

- [#134](https://github.com/FlutterGen/flutter_gen/issues/134) Support the at symbol (@) in file names.
- [#139](https://github.com/FlutterGen/flutter_gen/issues/139) Error: Method not found: '$checkedCreate

**Development**

- Replace to flutter_lints.

## 4.0.0

**Features**

- [BREAKING] Ended support for Non null safety codes.
- Use for `line_length` instead of `lineLength`.

**Development**

- Replace to [Melos](https://pub.dev/packages/melos).
- Add VSCode setting.

## 3.1.2

- [#117](https://github.com/FlutterGen/flutter_gen/issues/117) Update to analyzer 2.0.0.
  [flutter_gen_runner (flutter_gen_core) 3.1.2 -> analyzer 2.0.0 workaround](https://github.com/FlutterGen/flutter_gen/issues/121)

  ```yaml
  dependency_overrides:
    meta: ^1.7.0
  ```

- [#110](https://github.com/FlutterGen/flutter_gen/pull/110) Replace null safety dart style package.

## 3.1.1

**Features** & **Bug fix**

- [#103](https://github.com/FlutterGen/flutter_gen/pull/103) Add option packageParameterEnabled to control whether to generate package parameter for assets or not.

## 3.1.0

**Features**

- [#98](https://github.com/FlutterGen/flutter_gen/pull/98) Support for adding assets from a package

## 3.0.0, 3.0.1, 3.0.2

- Support Null Safety

```yaml
flutter_gen:
  output: lib/gen/
  line_length: 80
  null_safety: true # Optional (default: true)
```

## 2.0.1, 2.0.2, 2.0.3

- Update dependencies

## 2.0.0

New Feature

- [BREAKING CHANGE] [#49](https://github.com/FlutterGen/flutter_gen/issues/49) [#53](https://github.com/FlutterGen/flutter_gen/issues/53) Name collision with flutter localization when using build_runner

  ```yaml
  # Before
  # dev_dependencies:
  #  flutter_gen: 1.3.1

  # After
  dev_dependencies:
    flutter_gen_runner: ^2.0.0
  ```

- [#74](https://github.com/FlutterGen/flutter_gen/issues/74) Doesn't generate assets.gen.dart when there are no assets
  ```yaml
  flutter_gen:
    fonts:
      enabled: false
  ```
- [#59](https://github.com/FlutterGen/flutter_gen/issues/59) Handling duplicate file names
  ```dart
  // generated codes
  static const AssetGenImage imagesProfileJpg = AssetGenImage('assets/images/profile.jpg');
  static const AssetGenImage imagesProfilePng = AssetGenImage('assets/images/profile.png');
  ```

**Bug fix**

- [#75](https://github.com/FlutterGen/flutter_gen/issues/75) Null safety support for generated files

## 1.3.1

**Bug fix**

- [#60](https://github.com/FlutterGen/flutter_gen/issues/60) Set files like .DS_Store to the ignore list.

## 1.3.0

New Feature

- [#46](https://github.com/FlutterGen/flutter_gen/issues/46) Added support for unknown mime type files.
- Added support for [Rive (previously Flare)](https://rive.app/) files.

## 1.2.2

**Bug fix**

- [#51](https://github.com/FlutterGen/flutter_gen/pull/51) Added support for Key parameter in image() and svg().

## 1.2.1

**Bug fix**

- [#42](https://github.com/FlutterGen/flutter_gen/pull/42) Generated output folder name not being respected

## 1.2.0

New Feature

- [#40](https://github.com/FlutterGen/flutter_gen/pull/40) Support MaterialAccentColor

## 1.1.0

New Feature

- [#33](https://github.com/FlutterGen/flutter_gen/pull/33) Support to generate flat hierarchy assets with field name style:
  - camel-case
  - snake-case
  - dot-delimiter (Default)

## 1.0.3

**Bug fix**

- Insufficient params of flutter_svg [#32](https://github.com/FlutterGen/flutter_gen/pull/34)

## 1.0.2

**Bug fix**

- Generate sorted statements [#27](https://github.com/FlutterGen/flutter_gen/pull/27)
- Make Windows work properly [#28](https://github.com/FlutterGen/flutter_gen/pull/28)

## 1.0.1

**Bug fix**

- Issue [#21](https://github.com/FlutterGen/flutter_gen/issues/21)

## 1.0.0

Initial release.

- Assets generator
  - Supported image type.
  - Supported SVG as an integration.
  - And others.

- Fonts generator
- Colors generator
  - Supported xml file.
    - MaterialColor







 
