Skip to content

Design Doc: Extensible Enums in Federated Plugins #189696

Open

Description

@Mairramer

Document Link

flutter/rfc#44

What problem are you solving?

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.

Activity

  1. added
    📜Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")
    on Jul 18, 2026
  2. added
    in triagePresently being triaged by the triage team
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Jul 20, 2026
  3. puneetkukreja98 commented on Jul 20, 2026

    @puneetkukreja98
    Contributor

    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.

  4. added
    P1High-priority issues at the top of the work list
    on Jul 21, 2026
  5. Mairramer commented on Sep 30, 2026

    @Mairramer
    ContributorAuthor

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    📜Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")P1High-priority issues at the top of the work listc: proposalA detailed proposal for a change to Flutterdesign docTracks a design discussion documentteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions