hitTest method
Class to publish when tapped.
Implementation
@override
bool hitTest(Offset position) {
switch (count) {
case -1:
List<dynamic> list = [];
list.add(position);
double answer =
position.dx / (widgetSize ?? 0) / (graphCount ?? 0) * 100;
list.add(dialogData?[answer.floor()]);
controller.sink.add(list);
break;
case 2:
count = 0;
List<dynamic> list = [];
list.add(position);
double answer =
position.dx / (widgetSize ?? 0) / (graphCount ?? 0) * 100;
list.add(dialogData?[answer.floor()]);
controller.sink.add(list);
break;
}
count += 1;
return true;
}