typingDetection property

String? get typingDetection

Implementation

String? get typingDetection {
  final detections = value.text.toDetections(
    textStyle: const TextStyle(),
    detectedStyle: detectedStyle ??
        const TextStyle(
          color: Colors.blue,
        ),
    detectionRegExp: regExp ?? detectionRegExp()!,
  );
  final composer = Composer(
    selection: value.selection.start,
    sourceText: value.text,
    detectedStyle: detectedStyle ??
        const TextStyle(
          color: Colors.blue,
        ),
    detections: detections,
    composing: value.composing,
  );
  final typingRange = composer.typingDetection()?.range;
  if (typingRange == null) {
    return null;
  } else {
    return typingRange.textInside(value.text);
  }
}