Skip to content

CupertinoDialogAction.isDefaultAction is a misleading name #32005

@LongCatIsLooong

Description

@LongCatIsLooong

CupertinoDialogAction.isDefaultAction is a misleading name for iOS developers.

On iOS UIAlertAction.Style is an enum with 3 cases:

case `default`
case cancel
case destructive

CupertinoDialogAction's constructor's signature:

const CupertinoDialogAction({
  VoidCallback onPressed,
  bool isDefaultAction: false,
  bool isDestructiveAction: false,
  TextStyle textStyle,
  @required Widget child
})

where isDefaultAction is easily mistakable for the default case but they do different things and are not mutually exclusive.

Should probably explicitly state in the documentation that isDefaultAction is not the same as UIAlertAction.Style.default

Version

Channel master, v1.5.9-pre.117

Metadata

Metadata

Assignees

No one assigned

    Labels

    d: api docsIssues with https://api.flutter.dev/f: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions