typingDetection method

Detection? typingDetection()

Implementation

Detection? typingDetection() {
  final res = detections.where(
    (detection) =>
        detection!.style == detectedStyle &&
        detection.range.start <= selection &&
        detection.range.end >= selection,
  );
  if (res.isNotEmpty) {
    return res.first;
  } else {
    return null;
  }
}