selectionGesture property
Gesture for activating the selection.
Selection can be activated in ActivationMode.none
, ActivationMode.singleTap
,
ActivationMode.doubleTap
, and ActivationMode.longPress
.
Defaults to ActivationMode.singleTap
.
Also refer ActivationMode.
SelectionBehavior _selectionBehavior;
void initState() {
_selectionBehavior = SelectionBehavior(enable: true);
super.initState();
}
Widget build(BuildContext context) {
return Container(
child: SfCircularChart(
selectionGesture: ActivationMode.singleTap,
series: <PieSeries<ChartData, String>>[
PieSeries<ChartData, String>(
selectionBehavior: _selectionBehavior
),
],
)
);
}
Implementation
final ActivationMode selectionGesture;