Skip to content

Commit 6866c96

Browse files
author
Jenkins
committed
7.7.262
1 parent 708bc6a commit 6866c96

File tree

78 files changed

+222
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+222
-287
lines changed

.dart_tool/package_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"languageVersion": "3.1"
159159
}
160160
],
161-
"generated": "2025-04-17T13:10:23.116431Z",
161+
"generated": "2025-06-05T13:05:01.191685Z",
162162
"generator": "pub",
163163
"generatorVersion": "3.7.2",
164164
"flutterRoot": "file:///Users/administratorregula/development/flutter",

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919
}
2020

2121
dependencies {
22-
implementation('com.regula.documentreader:api:7.7.11299') {
22+
implementation('com.regula.documentreader:api:7.7.11452') {
2323
transitive = true
2424
}
2525

example/lib/extra/rfid_custom_ui.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class RFIDCustomUI {
9191
description(),
9292
progressBar(),
9393
cancelButton(),
94-
spacer(),
94+
spacer()
9595
],
9696
),
9797
),
@@ -111,9 +111,8 @@ class RFIDCustomUI {
111111

112112
Widget description() {
113113
return Container(
114-
child: Text(rfidDescription, textScaler: TextScaler.linear(1.4)),
115-
padding: const EdgeInsets.only(bottom: 40),
116-
);
114+
child: Text(rfidDescription, textScaler: TextScaler.linear(1.4)),
115+
padding: const EdgeInsets.only(bottom: 40));
117116
}
118117

119118
Widget progressBar() {
@@ -122,7 +121,9 @@ class RFIDCustomUI {
122121
child: LinearProgressIndicator(
123122
value: rfidProgress,
124123
minHeight: 10,
125-
valueColor: const AlwaysStoppedAnimation<Color>(Color(0xFF4285F4)),
124+
valueColor: const AlwaysStoppedAnimation<Color>(
125+
Color(0xFF4285F4),
126+
),
126127
),
127128
);
128129
}
@@ -131,7 +132,9 @@ class RFIDCustomUI {
131132
return TextButton(
132133
onPressed: () => finish(null),
133134
child: const Text("X"),
134-
style: TextButton.styleFrom(padding: const EdgeInsets.only(top: 50)),
135+
style: TextButton.styleFrom(
136+
padding: const EdgeInsets.only(top: 50),
137+
),
135138
);
136139
}
137140

@@ -144,7 +147,7 @@ class RFIDCustomUI {
144147
Text(""),
145148
Text(""),
146149
Text(""),
147-
Text(""),
150+
Text("")
148151
],
149152
);
150153
}

example/lib/main.dart

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ class MyAppState extends State<MyApp> {
4343
}
4444

4545
void handleCompletion(
46-
DocReaderAction action,
47-
Results? results,
48-
DocReaderException? error,
49-
) {
46+
DocReaderAction action, Results? results, DocReaderException? error) {
5047
if (error != null) print(error.message);
5148
if (action.stopped() && !shouldRfid(results)) {
5249
displayResults(results);
@@ -60,15 +57,12 @@ class MyAppState extends State<MyApp> {
6057
clearResults();
6158
if (results == null) return;
6259

63-
var name = await results.textFieldValueByType(
64-
FieldType.SURNAME_AND_GIVEN_NAMES,
65-
);
66-
var newDocImage = await results.graphicFieldImageByType(
67-
GraphicFieldType.DOCUMENT_IMAGE,
68-
);
69-
var newPortrait = await results.graphicFieldImageByType(
70-
GraphicFieldType.PORTRAIT,
71-
);
60+
var name =
61+
await results.textFieldValueByType(FieldType.SURNAME_AND_GIVEN_NAMES);
62+
var newDocImage =
63+
await results.graphicFieldImageByType(GraphicFieldType.DOCUMENT_IMAGE);
64+
var newPortrait =
65+
await results.graphicFieldImageByType(GraphicFieldType.PORTRAIT);
7266
var rfidPortrait = await results.graphicFieldImageByTypeSource(
7367
GraphicFieldType.PORTRAIT,
7468
ResultType.RFID_IMAGE_DATA,
@@ -122,7 +116,7 @@ class MyAppState extends State<MyApp> {
122116
documentImages(),
123117
scenarioSelector(),
124118
rfidCheckbox(),
125-
scanButtons(),
119+
scanButtons()
126120
],
127121
);
128122
}
@@ -184,17 +178,26 @@ class MyAppState extends State<MyApp> {
184178
),
185179
handleCompletion,
186180
);
187-
}),
181+
})
188182
],
189183
),
190184
);
191185
}
192186

193-
Widget image(String title, double height, double width, ImageProvider image) {
187+
Widget image(
188+
String title,
189+
double height,
190+
double width,
191+
ImageProvider image,
192+
) {
194193
return Column(
195194
children: <Widget>[
196195
Text(title),
197-
Image(height: height, width: width, image: image),
196+
Image(
197+
height: height,
198+
width: width,
199+
image: image,
200+
)
198201
],
199202
);
200203
}
@@ -203,10 +206,9 @@ class MyAppState extends State<MyApp> {
203206
Radio radio = Radio(
204207
value: scenarios[index].name,
205208
groupValue: selectedScenario.value,
206-
onChanged:
207-
(value) => setState(() {
208-
selectedScenario = Scenario.getByValue(value)!;
209-
}),
209+
onChanged: (value) => setState(() {
210+
selectedScenario = Scenario.getByValue(value)!;
211+
}),
210212
);
211213
return Container(
212214
padding: const EdgeInsets.only(left: 40),
@@ -276,10 +278,8 @@ class MyAppState extends State<MyApp> {
276278
final ThemeData theme = ThemeData();
277279
return MaterialApp(
278280
theme: theme.copyWith(
279-
colorScheme: theme.colorScheme.copyWith(
280-
primary: Colors.blue,
281-
surfaceTint: Colors.blue,
282-
),
281+
colorScheme: theme.colorScheme
282+
.copyWith(primary: Colors.blue, surfaceTint: Colors.blue),
283283
),
284284
home: Scaffold(
285285
appBar: AppBar(title: Center(child: Text(status))),
@@ -288,7 +288,9 @@ class MyAppState extends State<MyApp> {
288288
children: <Widget>[
289289
Visibility(
290290
visible: !rfidCustomUiExample.isShowing,
291-
child: Expanded(child: ui()),
291+
child: Expanded(
292+
child: ui(),
293+
),
292294
),
293295
btDeviceExample.build(),
294296
rfidCustomUiExample.build(),

ios/flutter_document_reader_api.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'flutter_document_reader_api'
3-
s.version = '7.7.174'
3+
s.version = '7.7.262'
44
s.summary = 'A new flutter plugin project.'
55
s.description = <<-DESC
66
A new flutter plugin project.
@@ -13,7 +13,7 @@ A new flutter plugin project.
1313
s.public_header_files = 'Classes/**/*.h'
1414
s.dependency 'Flutter'
1515
s.platform = :ios, '13.0'
16-
s.dependency 'DocumentReader', '7.7.4496'
16+
s.dependency 'DocumentReader', '7.7.4634'
1717
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
1818
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
1919
end

lib/flutter_document_reader_api.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,9 @@ class DocumentReader {
307307
///
308308
/// Check out [SuccessOrError] documentation for handling return type.
309309
Future<SuccessOrError> initializeReader(InitConfig config) async {
310-
var funcName =
311-
config._useBleDevice
312-
? "initializeReaderWithBleDeviceConfig"
313-
: "initializeReader";
310+
var funcName = config._useBleDevice
311+
? "initializeReaderWithBleDeviceConfig"
312+
: "initializeReader";
314313

315314
var response = await _bridge.invokeMethod(funcName, [config.toJson()]);
316315
var (success, error) = _successOrErrorFromJson(response);
@@ -658,12 +657,11 @@ typedef SuccessOrError = (bool, DocReaderException?);
658657
/// [results] defines current processing results.
659658
///
660659
/// [error] in case of anything is wrong - brief message for developer, `null` otherwise.
661-
typedef DocumentReaderCompletion =
662-
void Function(
663-
DocReaderAction action,
664-
Results? results,
665-
DocReaderException? error,
666-
);
660+
typedef DocumentReaderCompletion = void Function(
661+
DocReaderAction action,
662+
Results? results,
663+
DocReaderException? error,
664+
);
667665

668666
/// Callback for receiving signal, when a custom button,
669667
/// configured in [Customization.uiCustomizationLayer], is pressed.
@@ -684,8 +682,11 @@ typedef VideoEncoderCompletion = void Function(String filePath);
684682
/// [TransactionInfo] contains transactionId and tag.
685683
///
686684
/// [DocReaderException] in case of anything is wrong - brief message for developer, `null` otherwise.
687-
typedef FinalizePackageCompletion =
688-
(DocReaderAction action, TransactionInfo? info, DocReaderException? error);
685+
typedef FinalizePackageCompletion = (
686+
DocReaderAction action,
687+
TransactionInfo? info,
688+
DocReaderException? error
689+
);
689690

690691
/// Contains all possible DocumentReaderNotification callback codes
691692
enum DocReaderAction {

lib/src/config/init_config.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ class InitConfig {
7070
}
7171

7272
@visibleForTesting
73-
Map<String, dynamic> toJson() =>
74-
{
73+
Map<String, dynamic> toJson() => {
7574
"license": _dataToBase64(license),
7675
"delayedNNLoad": delayedNNLoad,
7776
"licenseUpdate": licenseUpdate,

lib/src/config/online_processing_config.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ class OnlineProcessingConfig {
4343
}
4444

4545
@visibleForTesting
46-
Map<String, dynamic> toJson() =>
47-
{
46+
Map<String, dynamic> toJson() => {
4847
"mode": mode.value,
4948
"url": url,
5049
"imageFormat": imageFormat.value,

lib/src/config/recognize_config.dart

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ class RecognizeConfig {
6161
Uint8List? livePortrait,
6262
Uint8List? extPortrait,
6363
bool oneShotIdentification = false,
64-
}) : _scenario = scenario,
65-
_onlineProcessingConfig = null,
66-
livePortrait = livePortrait,
67-
extPortrait = extPortrait,
68-
oneShotIdentification = oneShotIdentification,
69-
image = image,
70-
images = images,
71-
data = data,
72-
imageInputData = imageInputData,
73-
dtc = dtc;
64+
}) : _scenario = scenario,
65+
_onlineProcessingConfig = null,
66+
livePortrait = livePortrait,
67+
extPortrait = extPortrait,
68+
oneShotIdentification = oneShotIdentification,
69+
image = image,
70+
images = images,
71+
data = data,
72+
imageInputData = imageInputData,
73+
dtc = dtc;
7474

7575
RecognizeConfig.withOnlineProcessingConfig(
7676
OnlineProcessingConfig onlineProcessingConfig, {
@@ -82,16 +82,16 @@ class RecognizeConfig {
8282
Uint8List? livePortrait,
8383
Uint8List? extPortrait,
8484
bool oneShotIdentification = false,
85-
}) : _scenario = null,
86-
_onlineProcessingConfig = onlineProcessingConfig,
87-
livePortrait = livePortrait,
88-
extPortrait = extPortrait,
89-
oneShotIdentification = oneShotIdentification,
90-
image = image,
91-
images = images,
92-
data = data,
93-
imageInputData = imageInputData,
94-
dtc = dtc;
85+
}) : _scenario = null,
86+
_onlineProcessingConfig = onlineProcessingConfig,
87+
livePortrait = livePortrait,
88+
extPortrait = extPortrait,
89+
oneShotIdentification = oneShotIdentification,
90+
image = image,
91+
images = images,
92+
data = data,
93+
imageInputData = imageInputData,
94+
dtc = dtc;
9595

9696
RecognizeConfig._empty();
9797

@@ -127,8 +127,7 @@ class RecognizeConfig {
127127
}
128128

129129
@visibleForTesting
130-
Map<String, dynamic> toJson() =>
131-
{
130+
Map<String, dynamic> toJson() => {
132131
"scenario": scenario?.value,
133132
"onlineProcessingConfig": onlineProcessingConfig?.toJson(),
134133
"image": _bytesToBase64(image),
@@ -159,16 +158,16 @@ class ImageInputData {
159158
Uint8List image, {
160159
Lights light = Lights.WHITE_FULL,
161160
int pageIndex = 0,
162-
}) : _image = image,
163-
_light = light,
164-
_pageIndex = pageIndex;
161+
}) : _image = image,
162+
_light = light,
163+
_pageIndex = pageIndex;
165164

166165
@visibleForTesting
167166
Map<String, dynamic> toJson() => {
168-
"image": _bytesToBase64(image),
169-
"light": light.value,
170-
"pageIndex": pageIndex,
171-
};
167+
"image": _bytesToBase64(image),
168+
"light": light.value,
169+
"pageIndex": pageIndex,
170+
};
172171

173172
@visibleForTesting
174173
static ImageInputData? fromJson(jsonObject) {

0 commit comments

Comments
 (0)