Skip to content

Commit 4861980

Browse files
author
Jenkins
committed
8.2.458
1 parent 681bf8e commit 4861980

File tree

13 files changed

+409
-569
lines changed

13 files changed

+409
-569
lines changed

.dart_tool/package_config.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"packages": [
44
{
55
"name": "async",
6-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/async-2.12.0",
6+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/async-2.13.0",
77
"packageUri": "lib/",
88
"languageVersion": "3.4"
99
},
@@ -33,37 +33,37 @@
3333
},
3434
{
3535
"name": "fake_async",
36-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/fake_async-1.3.2",
36+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/fake_async-1.3.3",
3737
"packageUri": "lib/",
3838
"languageVersion": "3.3"
3939
},
4040
{
4141
"name": "flutter",
4242
"rootUri": "file:///Users/administratorregula/development/flutter/packages/flutter",
4343
"packageUri": "lib/",
44-
"languageVersion": "3.7"
44+
"languageVersion": "3.8"
4545
},
4646
{
4747
"name": "flutter_test",
4848
"rootUri": "file:///Users/administratorregula/development/flutter/packages/flutter_test",
4949
"packageUri": "lib/",
50-
"languageVersion": "3.7"
50+
"languageVersion": "3.8"
5151
},
5252
{
5353
"name": "leak_tracker",
54-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/leak_tracker-10.0.8",
54+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2",
5555
"packageUri": "lib/",
5656
"languageVersion": "3.2"
5757
},
5858
{
5959
"name": "leak_tracker_flutter_testing",
60-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.9",
60+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10",
6161
"packageUri": "lib/",
6262
"languageVersion": "3.2"
6363
},
6464
{
6565
"name": "leak_tracker_testing",
66-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1",
66+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2",
6767
"packageUri": "lib/",
6868
"languageVersion": "3.2"
6969
},
@@ -101,7 +101,7 @@
101101
"name": "sky_engine",
102102
"rootUri": "file:///Users/administratorregula/development/flutter/bin/cache/pkg/sky_engine",
103103
"packageUri": "lib/",
104-
"languageVersion": "3.7"
104+
"languageVersion": "3.8"
105105
},
106106
{
107107
"name": "source_span",
@@ -135,21 +135,21 @@
135135
},
136136
{
137137
"name": "test_api",
138-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/test_api-0.7.4",
138+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/test_api-0.7.6",
139139
"packageUri": "lib/",
140140
"languageVersion": "3.5"
141141
},
142142
{
143143
"name": "vector_math",
144-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/vector_math-2.1.4",
144+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/vector_math-2.2.0",
145145
"packageUri": "lib/",
146-
"languageVersion": "2.14"
146+
"languageVersion": "3.1"
147147
},
148148
{
149149
"name": "vm_service",
150-
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/vm_service-14.3.1",
150+
"rootUri": "file:///Users/administratorregula/.pub-cache/hosted/pub.dev/vm_service-15.0.2",
151151
"packageUri": "lib/",
152-
"languageVersion": "3.3"
152+
"languageVersion": "3.5"
153153
},
154154
{
155155
"name": "flutter_document_reader_api",
@@ -158,10 +158,9 @@
158158
"languageVersion": "3.1"
159159
}
160160
],
161-
"generated": "2025-07-24T20:01:21.609472Z",
162161
"generator": "pub",
163-
"generatorVersion": "3.7.2",
162+
"generatorVersion": "3.9.0",
164163
"flutterRoot": "file:///Users/administratorregula/development/flutter",
165-
"flutterVersion": "3.29.2",
164+
"flutterVersion": "3.35.1",
166165
"pubCache": "file:///Users/administratorregula/.pub-cache"
167166
}

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,11 @@
33

44
[![pub package](https://img.shields.io/pub/v/flutter_document_reader_api.svg)](https://pub.dev/packages/flutter_document_reader_api)
55

6-
Regula Document Reader SDK allows you to read various kinds of identification documents, passports, driving licenses, ID cards, etc. All processing is performed completely _**offline**_ on your device. No any data leaving your device.
7-
8-
You can use native camera to scan the documents or image from gallery for extract all data from it.
9-
10-
This repository contains the source code of the Document Reader API, and the sample application that demonstrates the _**API**_ calls you can use to interact with the Document Reader library.
6+
Document Reader allows you to read various kinds of identification documents, passports, driving licenses, ID cards, etc. All processing is performed completely offline on your device. This plugin makes possible to use it with flutter.
117

128
## Documentation
13-
14-
You can find documentation [here](https://docs.regulaforensics.com/develop/doc-reader-sdk/mobile).
15-
16-
## License
17-
18-
To obtaining the production license or other purchasing information, please [submit an inquiry](https://regulaforensics.com/talk-to-an-expert) and our sales team will contact you shortly.
9+
* [Documentation](https://docs.regulaforensics.com/develop/doc-reader-sdk/mobile)
10+
* [API Reference](https://pub.dev/documentation/flutter_document_reader_api)
1911

2012
## Support
21-
22-
Please do not hesitate to [contact us](https://support.regulaforensics.com/hc/requests/new), if you need any assistance or want to report a bug / suggest an improvement.
13+
If you have any technical questions, feel free to [contact](mailto:[email protected]) us or create issues [here](https://github.com/regulaforensics/DocumentReader-Flutter/issues).

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ android {
2828
}
2929

3030
dependencies {
31-
implementation('com.regula.documentreader:api:8.2.11679') {
31+
implementation('com.regula.documentreader:api:8.2.11804') {
3232
transitive = true
3333
}
3434

example/README.md

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,18 @@
22

33
## How to build demo application
44

5-
1. Get the trial license at [client.regulaforensics.com](https://client.regulaforensics.com/) (`regula.license` file). The license creation wizard will guide you through the necessary steps.
6-
2. Get the trial database at [client.regulaforensics.com/customer/databases](https://client.regulaforensics.com/customer/databases) (`db.dat`)
7-
3. Download or clone this repository using the command `git clone https://github.com/regulaforensics/DocumentReader-Flutter.git`.
8-
4. Copy the `regula.license` file to the `example/assets` folder.
9-
5. Copy the `db.dat` file to the `example/android/app/src/main/assets/Regula/` folder.
10-
6. Copy the `db.dat` file to the `example/ios/Runner/` folder.
11-
7. Run the following commands in Terminal:
12-
```bash
13-
$ cd example
14-
# Install packages
15-
$ flutter pub get
16-
# Check that supported devices are running
17-
$ flutter devices
18-
# Run the app
19-
$ flutter run
20-
```
5+
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/DocumentReader-Flutter.git`.
6+
2. Put `regula.license` file at `assets/` (you can get a trial license [here](https://client.regulaforensics.com)).
7+
3. Put `db.dat` file at `ios/Runner/` and `android/app/src/main/assets/Regula/` (you can get a trial database [here](https://client.regulaforensics.com/customer/databases))
8+
4. Execute `flutter pub get` within this directory.
9+
5. Run the app: `flutter run`.
2110

22-
## Exra examples
11+
## Additional examples
2312

24-
#### RFID options
13+
### Bluetooth device
2514

26-
This demo app covers 3 different ways of reading RFID:
27-
1. Basic, the simplest one. Requires only one callback to handle the results.
28-
2. Advanced. Shows how to set additional callbacks to handle specific events during RFID chip reading.
29-
3. Custom, the most complex one. Shows how to make your own custom UI for RFID chip reading and how to display RFID progress manually.
15+
In order to connect to an external scanning device, change the `useBtDevice` constant to true in `src/extra/bt_device`, and set `btDeviceName` to the name of your device. After running the app, click `Connect`.
3016

31-
You can switch between these options using a static variable `rfidOption`.
32-
Default: `RfidOption.Basic`.
17+
### RFID self hosted UI
3318

34-
#### Bluetooth device
35-
36-
This demo app describes how Regula Bluetooth Device can be used to scan a document:
37-
1. Set static variable `useBleDevice` to `true`(default: `false`).
38-
2. If you've put a license file into the project, you can remove it. License will be automatically retrieved from your bluetooth device.
39-
3. Turn on bluetooth device and run the app.
40-
4. Enter the device's name into the text field and hit `connect` button. You may be asked for bluetooth permissions.
41-
5. If connection was successful, document reader will initialize and you'll see a list of scenarios. Choose the preffered one and start scanning.
42-
43-
## Troubleshooting license issues
44-
45-
If you have issues with license verification when running the application, please verify that next is true:
46-
1. The OS, which you use, is specified in the license (e.g., Android and/or iOS).
47-
2. The license is valid (not expired).
48-
3. The date and time on the device, where you run the application, are valid.
49-
4. You use the latest release version of the Document Reader SDK.
50-
5. You placed the `license` into the correct folder as described [here](#how-to-build-demo-application).
19+
This app also demonstraits how you can implement you own UI for the RFID reading process. To enable it, change the `useRfidSelfHostedUI` constant to true in `src/extra/custom_rfid`. Run the app and initiate RFID reading.

example/lib/extra/bt_device.dart

Lines changed: 29 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,39 @@
1-
//
2-
// bt_device.dart
3-
// DocumentReader
4-
//
5-
// Created by Pavel Masiuk on 15.07.2024.
6-
// Copyright © 2024 Regula. All rights reserved.
7-
//
8-
91
import 'package:flutter/material.dart';
102
import 'package:flutter_document_reader_api/flutter_document_reader_api.dart';
113
import 'package:flutter_document_reader_api_example/main.dart';
124

13-
class BtDevice {
14-
var documentReader = DocumentReader.instance;
15-
late MyAppState main;
16-
String btDeviceName = "Regula 0000";
5+
var useBtDevice = false;
6+
var btDeviceName = "Regula 0000";
177

18-
init(MyAppState main) {
19-
this.main = main;
20-
if (MyAppState.useBleDevice) {
21-
main.setStatus("Connect to a bluetooth device");
22-
}
23-
}
8+
void setupBTDevice() {
9+
setStatus("Connect to a bluetooth device");
10+
}
2411

25-
connect() async {
26-
main.setStatus("Searching for devices...");
27-
if (await documentReader.connectBluetoothDevice(btDeviceName)) {
28-
await main.init();
29-
documentReader.functionality.useAuthenticator = true;
30-
} else {
31-
main.setStatus("Failed to connect");
32-
}
12+
void connect() async {
13+
setStatus("Searching for devices...");
14+
if (await DocumentReader.instance.connectBluetoothDevice(btDeviceName)) {
15+
await init();
16+
DocumentReader.instance.functionality.useAuthenticator = true;
17+
useBtDevice = false;
18+
} else {
19+
setStatus("Failed to connect");
3320
}
21+
}
3422

35-
Widget build() {
36-
return Visibility(
37-
visible: MyAppState.useBleDevice,
38-
child: Padding(
39-
padding: EdgeInsets.only(bottom: 10),
40-
child: Row(
41-
mainAxisAlignment: MainAxisAlignment.center,
42-
children: <Widget>[
43-
textField(),
44-
MyAppState.button("Connect", () => connect()),
45-
],
46-
),
47-
),
48-
);
49-
}
23+
Future<bool> initializeWithBTDevice() async {
24+
setStatus("Initializing...");
5025

51-
Widget textField() {
52-
return Padding(
53-
padding: EdgeInsets.only(bottom: 12.5),
54-
child: SizedBox(
55-
width: 160,
56-
child: TextFormField(
57-
decoration: InputDecoration(
58-
border: OutlineInputBorder(),
59-
hintText: btDeviceName,
60-
),
61-
onChanged: (text) => btDeviceName = text,
62-
),
63-
),
64-
);
65-
}
26+
var initConfig = InitConfig.withBleDevice();
27+
initConfig.delayedNNLoad = true;
28+
var (success, error) = await DocumentReader.instance.initialize(initConfig);
29+
30+
handleException(error);
31+
return success;
32+
}
33+
34+
Widget btDeviceUI() {
35+
return Visibility(
36+
visible: useBtDevice,
37+
child: Row(children: [Expanded(child: button("Connect", () => connect()))]),
38+
);
6639
}

0 commit comments

Comments
 (0)