Skip to content

Add a CupertinoCollapsible widget #153937

@kerberjg

Description

@kerberjg

Use case

A an animated "container" widget that can be expanded/collapsed similar to many native iOS apps.
Examples:

Screen.Recording.2024-07-30.at.19.07.02.mov
RPReplay_Final1724341148.mov
  • Collapsible groups (source: iOS 17 Mail app)
RPReplay_Final1724341108.mov

Proposal

I've already started working on it as a part of #60762 and I'm ready to open a PR to contribute this feature.

I suggest the name "collapsible" due to it being closer to native iOS SwiftUI nomenclature (https://developer.apple.com/documentation/swiftui/section/collapsible(_:))

The suggested API is very simple something along the lines of:

CupertinoCollapsibleContainer(
  collapsed: true,
  child: Text("Hello World!"),
),

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityf: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions