Skip to content

Decouple generated asset classes by introducing flutter_gen_interface package#760

Open
Mairramer wants to merge 3 commits into
FlutterGen:mainfrom
Mairramer:feat/759-flutter-gen-interface
Open

Decouple generated asset classes by introducing flutter_gen_interface package#760
Mairramer wants to merge 3 commits into
FlutterGen:mainfrom
Mairramer:feat/759-flutter-gen-interface

Conversation

@Mairramer
Copy link
Copy Markdown

@Mairramer Mairramer commented May 28, 2026

feat: add flutter_gen_interface package

What does this change?

This PR introduces the flutter_gen_interface package, extracting the AssetGenImage, SvgGenImage, and AssetGenImageAnimation classes into a shared, standalone dependency.

Motivation and Context:
In modular Flutter architectures (Monorepos, Design Systems), generating these classes inline within each package causes type conflicts, as each package has its own isolated version of AssetGenImage. By importing these base classes from flutter_gen_interface, all packages now share the same inheritance tree, allowing strongly-typed assets to be passed seamlessly across package boundaries.

Fixes #759

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
    • Ensure the tests (melos run test)
    • Ensure the analyzer and formatter pass (melos run format to automatically apply formatting)
  • Appropriate docs were updated (if necessary)

@Mairramer Mairramer marked this pull request as ready for review May 28, 2026 14:03
@Mairramer Mairramer changed the title WIP decouple generated asset classes by introducing flutter_gen_interface package Decouple generated asset classes by introducing flutter_gen_interface package May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: Allow generated asset classes to implement custom interfaces (for Modular Architectures & Design Systems)

1 participant