Skip to content

[rfw] Add Flexible widget support to core widgets #173313

Closed
flutter/packages
#9750

Description

@BottlePumpkin

Use case

When building dynamic layouts through RFW, developers need the ability to create flexible layouts with fine-grained control over how space is distributed among children in a Row or Column. Currently, RFW only supports:

  • Expanded: Always takes all available space (FlexFit.tight)
  • No option for FlexFit.loose behavior

Real-world scenarios where Flexible is needed:

  1. Creating layouts where widgets should only take the space they need (loose fit)
  2. Building responsive designs that adapt to content size
  3. Implementing complex flex layouts that mix tight and loose fitting widgets

Current Limitation

// Currently impossible in RFW - only Expanded is available
Column(
  children: [
    Flexible(  // ❌ Not supported
      fit: "loose",
      child: Text(text: "Only takes needed space")
    ),
    Expanded(  // ✅ Supported
      child: Text(text: "Takes all remaining space")
    ),
  ],
)

Proposal

Add Flexible widget support to RFW's core widgets library with the following API:

  • flex: int (default: 1) - The flex factor
  • fit: FlexFit enum ("loose" | "tight", default: "loose") - How the child fills available space
  • child: Widget (required) - The widget below this in the tree

This matches Flutter's native Flexible widget API exactly, ensuring consistency and predictability for developers.

flutter/packages#9750 provides a complete implementation with tests.

Activity

  1. tirth-patel-nc commented on Aug 6, 2025

    @tirth-patel-nc
    Member

    thanks for the detailed report and potential fix. labelling it as a new proposal.

  2. added
    c: new featureNothing broken; request for a new capability
    c: proposalA detailed proposal for a change to Flutter
    p: rfwRemote Flutter Widgets package
    c: new widgetMust also have "c: new feature". Request for a new widget.
    packageflutter/packages repository. See also p: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Aug 6, 2025
  3. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Dec 10, 2025
  4. flutter-triage-bot commented on Dec 10, 2025

    @flutter-triage-bot

    This issue is assigned to @BottlePumpkin but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  5. github-actions commented on Dec 24, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  6. locked as resolved and limited conversation to collaborators on Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

⏳Bot is counting down the days until it unassigns the issuec: new featureNothing broken; request for a new capabilityc: new widgetMust also have "c: new feature". Request for a new widget.c: proposalA detailed proposal for a change to Flutterp: rfwRemote Flutter Widgets packagepackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions