You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Design Doc: Extensible Enums in Federated Plugins #189696
To establish a clear, maintainable architectural pattern for exposing platform-specific constants (e.g., ImageFormatGroup in camera plugins) in Flutter federated plugins. This system must allow value sets to safely grow as underlying native APIs evolve (iOS, Android, Web, etc), without introducing breaking changes or forcing major version bumps for downstream developers using exhaustive switch statements.
Assigning team-ecosystem since this design doc proposes a API pattern for Flutter's federated plugins, with the camera plugin serving as the motivating example.
While reviewing some PRs, I came across this one: #193528. It has a similar pattern to what we're trying to address in packages.
Do you think it would be worth expanding this to the Flutter repo as well? Mainly to establish when a public enum makes more sense than a public class (and vice-versa), and whether the conversion is worth the effort.
Depending on the outcome, I can also move this to flutter/rfc. I'm just waiting for the final decision.
Activity
puneetkukreja98 commentedon Jul 20, 2026
Assigning team-ecosystem since this design doc proposes a API pattern for Flutter's federated plugins, with the camera plugin serving as the motivating example.
Mairramer commentedon Sep 30, 2026
@stuartmorgan-g @loic-sharma
While reviewing some PRs, I came across this one: #193528. It has a similar pattern to what we're trying to address in
packages.Do you think it would be worth expanding this to the Flutter repo as well? Mainly to establish when a public enum makes more sense than a public class (and vice-versa), and whether the conversion is worth the effort.
Depending on the outcome, I can also move this to flutter/rfc. I'm just waiting for the final decision.