t×tecexpressby TeKOcloud
DEv0.7.1
Navigation & feedback / FLUTTER

TxContextMenu.

Interactive preview

Context actions opened by right-clicking or long-pressing the target.

TxContextMenu

ParameterTypeDefaultMeaning
childWidgetrequiredContent or target widget.
itemsList<TxAction>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
onItemClickValueChanged<TxAction>?nullReports the activated entry; arguments follow the callback signature.
disabledboolfalseDisables interaction.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget example() {

  return TxContextMenu(items: const [TxAction(id: 'copy', text: 'Copy')], onItemClick: (action) {}, child: const Text('Right click here'));
}