read static method

Future<List<OcrText>> read({
  1. bool flash = false,
  2. bool autoFocus = true,
  3. bool multiple = false,
  4. bool waitTap = false,
  5. bool showText = true,
  6. Call preview = PREVIEW,
  7. int camera = CAMERA_BACK,
  8. double fps = 2.0,
})

read the camera status , is preview , is camera back , is flash on , is autofocus

Implementation

static Future<List<OcrText>> read({
  bool flash = false,
  bool autoFocus = true,
  bool multiple = false,
  bool waitTap = false,
  bool showText = true,
  Call preview = PREVIEW,
  int camera = CAMERA_BACK,
  double fps = 2.0,
}) async {
  Map<String, dynamic> arguments = {
    'flash': flash,
    'autoFocus': autoFocus,
    'multiple': multiple,
    'waitTap': waitTap,
    'showText': showText,
    'previewWidth': PREVIEW.width,
    'previewHeight': PREVIEW.height,
    'camera': camera,
    'fps': fps,
  };

  final List list = await _channel.invokeMethod('read', arguments);

  return list.map((map) => OcrText.fromMap(map)).toList();
}