goodonion
goodonion

Reputation: 1779

How do I disable flutter_chart selection?

Anyone knows how to disable the chart selection in Flutter?

I'm referring this library which's the most popular chart library in Flutter.

https://pub.dev/packages/charts_flutter

Upvotes: 2

Views: 638

Answers (1)

iDecode
iDecode

Reputation: 28906

Wrap your flutter_chart's widget (sorry I never used it on my own, so not sure widget name) in AbsorbPointer widget

AbsorbPointer(
  absorbing: true, // disable selection 
  child: YourChartWidget(),
);

Upvotes: 5

Related Questions