isDetected static method
Check if the text has detection
Implementation
static bool isDetected(String value, RegExp detectionRegExp) {
final decoratedTextColor = Colors.blue;
final result = value.toDetections(
textStyle: TextStyle(),
detectedStyle: TextStyle(
color: decoratedTextColor,
),
detectionRegExp: detectionRegExp,
);
final detections = result
.where((detection) => detection.style!.color == decoratedTextColor)
.toList();
return detections.isNotEmpty;
}