checkTextReadability static method

Future<bool> checkTextReadability(
  1. File imageFile
)

Implementation

static Future<bool> checkTextReadability(File imageFile) async {
  try {
    final textDetectionResult = await _detectText(imageFile);

    if (textDetectionResult[0]) {
      print("Text or number is clearly visible in the image.");
      return true;
    } else {
      print("No text or number detected, or not clearly visible.");
      return false;
    }
  } catch (e) {
    print('Error during text detection: $e');
    return false;
  }
}