-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Use case
Most of the time, our buttons may need to be rectangular rather than perfectly square. Currently, CupertinoButton only has a minSize property. For users, it is unclear whether this refers to width or height. Moreover, it is impossible to set a minimum size with unequal width and height. The only option is to adjust the size of its child to achieve the desired dimensions.
Specifically:
flutter/packages/flutter/lib/src/cupertino/button.dart
Lines 418 to 428 in b5df290
| child: ConstrainedBox( | |
| constraints: BoxConstraints( | |
| minWidth: | |
| widget.minSize ?? | |
| kCupertinoButtonMinSize[widget.sizeStyle] ?? | |
| kMinInteractiveDimensionCupertino, | |
| minHeight: | |
| widget.minSize ?? | |
| kCupertinoButtonMinSize[widget.sizeStyle] ?? | |
| kMinInteractiveDimensionCupertino, | |
| ), |
I think this place should use minWidth and minHeight.
Proposal
Add minWidth and minHeight to replace minSize.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team