GitHub

    Table of contents

  1. 示例
  2. 相关链接

CupertinoContextMenu

Edit this page

A full-screen modal route that opens when the child is long-pressed.

示例

CupertinoContextMenu(
  child: Container(
    width: 100,
    height: 60,
    color: Colors.red,
  ),
  actions: <Widget>[
    CupertinoContextMenuAction(
      child: const Text('Action one'),
      onPressed: () {
        Navigator.pop(context);
      },
    ),
    CupertinoContextMenuAction(
      child: const Text('Action two'),
      onPressed: () {
        Navigator.pop(context);
      },
    ),
  ],
)

相关链接