typingDetection method

Detection? typingDetection()

Implementation

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