'How to enable holding tooltip for charts_flutter

I am using charts_flutter and I want to be able to have a tooltip appear with the bar group's values when I hold on that groiup for long enough, I know there is the SelectionModel but that only applies on selection.

Code:

class ChartControlState extends State<ChartControl> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text(widget.chartTitle, style: TextStyle(fontWeight: FontWeight.bold)),
        LimitedBox(
          maxHeight: MediaQuery.of(context).size.height * 0.5,
          maxWidth: MediaQuery.of(context).size.width - 10,
          child: charts.BarChart(
            createSeriesList(widget.data),
            animate: true,
            //external component list??
            behaviors: createBehaviors(),
            //onTap function on each bar

            selectionModels: [
              charts.SelectionModelConfig(
                  updatedListener: (charts.SelectionModel model) {
                print('a');
              }, changedListener: (charts.SelectionModel model) {
                print((model.selectedDatum[0].datum as DataPoint).value);
              })
            ],
          ),
        ),
      ],
    );
  }

Does anyone know how to add the hold to trigger event?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source