🙌🏻 立即获取「wordway」,由社区驱动的背单词应用,基于 Flutter 开发。🙌🏻

CupertinoActionSheet

Edit this page

A convenience widget that combines common painting, positioning, and sizing widgets.

Example

Future<void> _handleClickMe() async {
  return showCupertinoModalPopup<void>(
    context: context,
    builder: (BuildContext context) {
      return CupertinoActionSheet(
        title: Text('Favorite Dessert'),
        message: Text('Please select the best dessert from the options below.'),
        actions: <Widget>[
          CupertinoActionSheetAction(
            child: Text('Profiteroles'),
            onPressed: () { /** */ },
          ),
          CupertinoActionSheetAction(
            child: Text('Cannolis'),
            onPressed: () { /** */ },
          ),
          CupertinoActionSheetAction(
            child: Text('Trifie'),
            onPressed: () { /** */ },
          ),
        ],
        cancelButton: CupertinoActionSheetAction(
          isDefaultAction: true,
          child: Text('Cancel'),
          onPressed: () { /** */ },
        ),
      );
    },
  );
}

Related Links