Skip to content

CupertinoSheetRoute customize top gap #169465

@samanson123

Description

@samanson123

Use case

Hello,

I'm loving the look of the CupertinoSheetRoute and its convenience method showCupertinoSheet however currently it seems that it isn't possible to customize the top gap which is restricting it's usage somewhat as a viable alternative to the material version showModalBottomSheet.

Currently it seems the top gap is hardcoded as: const double _kTopGapRatio = 0.08;

Proposal

I propose that this top gap valuable becomes an optional property, with the default value being kept as it is.

This could be implemented in the showCupertinoModalPopup via the following example:

      await showCupertinoSheet(
          context: context, 
          topGap: 2 
          pageBuilder: (BuildContext context) => Text("Example text") 
      ); 

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions