# OCR

### The method use to Start OCR scanning is

```
AccuraOcr.startOcrWithCard(config)
```

In the above method, the 'config' parameter is an array that consists of the following values, provided in the same format and sequence as shown below: Country ID, Card ID, Card Name, and Card Type. All these values will be provided by the license. Please note that the specific values for Country ID, Card ID, Card Name, and Card Type will vary based on your licensing information.

```
var config = [
  countrySelect['id'],  //Country id(Integer)
  cardSelected['id'],   //Card id(Integer)
  cardSelected['name'], //Card name(String)
  cardSelected['type'], //Card type(Integer)
];
```

### The example function is shown below

<pre><code>Future&#x3C;void> startOCR() async {
try {
var config = [
  countrySelect['id'],
  cardSelected['id'],
  cardSelected['name'],
  cardSelected['type'],
];
await AccuraOcr.startOcrWithCard(config)
    .then((value) =>
{
  setState(() {
    dynamic result = json.decode(value);
        })
      })
    .onError((error, stackTrace) =>{
    });
<strong>  } on PlatformException {}
</strong>}
</code></pre>

### ***Response:***

**On Success:** JSON String Response

**Error:** String


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.accurascan.com/language/flutter/functions/ocr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
