Tesseract constructor

Tesseract({
  1. List<String> languages = const ['eng'],
  2. PageSegMode pageSegMode = PageSegMode.auto,
  3. String? tessDataPath,
  4. String? configFilePath,
  5. String? tempDir,
})

Implementation

Tesseract({
  /// The path to the Tesseract data directory.
  List<String> languages = const ['eng'],
  PageSegMode pageSegMode = PageSegMode.auto,
  String? tessDataPath,
  String? configFilePath,
  String? tempDir,
})  : _languages = languages,
      _pageSegMode = pageSegMode,
      _tessDataPath =
          tessDataPath ?? Platform.environment['TESS_DATA_PATH'] ?? '',
      _configFilePath =
          configFilePath ?? Platform.environment['TESS_CONFIG_FILE'] ?? '',
      _tempDir = tempDir ??
          Platform.environment['TEMP'] ??
          Platform.environment['TMP'] ??
          Directory.systemTemp.path,
      super(
        bindings.flusseract.Create(),
        bindings.flusseract.Destroy,
      );