Skip to content

Commit c7af6e2

Browse files
committed
- Dependency updates
- validateText and validateType deprecated removed
1 parent ddb2947 commit c7af6e2

File tree

8 files changed

+34
-84
lines changed

8 files changed

+34
-84
lines changed

.flutter-plugins

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This is a generated file; do not edit or check into version control.
2-
mobile_scanner=/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-3.2.0/
2+
mobile_scanner=/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-3.2.0/","native_build":true,"dependencies":[]}],"android":[{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-3.2.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-3.2.0/","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"mobile_scanner","path":"/Users/arvindsangwan/.pub-cache/hosted/pub.dev/mobile_scanner-3.2.0/","dependencies":[]}]},"dependencyGraph":[{"name":"mobile_scanner","dependencies":[]}],"date_created":"2023-04-17 18:08:30.734421","version":"3.7.11"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","native_build":true,"dependencies":[]}],"android":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"mobile_scanner","path":"/Users/arvind/.pub-cache/hosted/pub.dev/mobile_scanner-3.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"mobile_scanner","dependencies":[]}],"date_created":"2023-06-28 02:12:43.579902","version":"3.10.5"}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.0.7
2+
3+
- Dependency updates
4+
- validateText and validateType deprecated removed
5+
16
## 0.0.6
27

38
- Readme updated

example/pubspec.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ packages:
1515
path: ".."
1616
relative: true
1717
source: path
18-
version: "0.0.6"
18+
version: "0.0.7"
1919
async:
2020
dependency: transitive
2121
description:
2222
name: async
23-
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
23+
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
2424
url: "https://pub.dev"
2525
source: hosted
26-
version: "2.10.0"
26+
version: "2.11.0"
2727
boolean_selector:
2828
dependency: transitive
2929
description:
@@ -36,10 +36,10 @@ packages:
3636
dependency: transitive
3737
description:
3838
name: characters
39-
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
39+
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
4040
url: "https://pub.dev"
4141
source: hosted
42-
version: "1.2.1"
42+
version: "1.3.0"
4343
clock:
4444
dependency: transitive
4545
description:
@@ -52,10 +52,10 @@ packages:
5252
dependency: transitive
5353
description:
5454
name: collection
55-
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
55+
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
5656
url: "https://pub.dev"
5757
source: hosted
58-
version: "1.17.0"
58+
version: "1.17.1"
5959
cupertino_icons:
6060
dependency: "direct main"
6161
description:
@@ -163,10 +163,10 @@ packages:
163163
dependency: transitive
164164
description:
165165
name: js
166-
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
166+
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
167167
url: "https://pub.dev"
168168
source: hosted
169-
version: "0.6.5"
169+
version: "0.6.7"
170170
lints:
171171
dependency: transitive
172172
description:
@@ -179,10 +179,10 @@ packages:
179179
dependency: transitive
180180
description:
181181
name: matcher
182-
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
182+
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
183183
url: "https://pub.dev"
184184
source: hosted
185-
version: "0.12.13"
185+
version: "0.12.15"
186186
material_color_utilities:
187187
dependency: transitive
188188
description:
@@ -195,26 +195,26 @@ packages:
195195
dependency: transitive
196196
description:
197197
name: meta
198-
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
198+
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
199199
url: "https://pub.dev"
200200
source: hosted
201-
version: "1.8.0"
201+
version: "1.9.1"
202202
mobile_scanner:
203203
dependency: transitive
204204
description:
205205
name: mobile_scanner
206-
sha256: da55204e5439bc8dc058df56231a7a1d513c6ec9cbad84492f56d493382d296f
206+
sha256: "54dd914e1bb5758b3db7aa02e56d65d80285ba0705e0e5fa5cfbb11e27344c4b"
207207
url: "https://pub.dev"
208208
source: hosted
209-
version: "3.2.0"
209+
version: "3.3.0"
210210
path:
211211
dependency: transitive
212212
description:
213213
name: path
214-
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
214+
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
215215
url: "https://pub.dev"
216216
source: hosted
217-
version: "1.8.2"
217+
version: "1.8.3"
218218
plugin_platform_interface:
219219
dependency: transitive
220220
description:
@@ -272,10 +272,10 @@ packages:
272272
dependency: transitive
273273
description:
274274
name: test_api
275-
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
275+
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
276276
url: "https://pub.dev"
277277
source: hosted
278-
version: "0.4.16"
278+
version: "0.5.1"
279279
typed_data:
280280
dependency: transitive
281281
description:
@@ -293,5 +293,5 @@ packages:
293293
source: hosted
294294
version: "2.1.4"
295295
sdks:
296-
dart: ">=2.18.0 <3.0.0"
296+
dart: ">=3.0.0-0 <4.0.0"
297297
flutter: ">=3.0.0"

lib/ai_barcode_scanner.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ library ai_barcode_scanner;
22

33
export 'src/ai_barcode_scanner.dart';
44
export 'package:mobile_scanner/mobile_scanner.dart';
5-
export 'src/enums/validate_type.dart';
65
export 'src/overlay.dart';

lib/src/ai_barcode_scanner.dart

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
44
import 'package:flutter/services.dart';
55
import 'package:mobile_scanner/mobile_scanner.dart';
66

7-
import 'enums/validate_type.dart';
87
import 'overlay.dart';
98

109
/// Barcode scanner widget
@@ -19,18 +18,6 @@ class AiBarcodeScanner extends StatefulWidget {
1918
/// [args] Information about the state of the MobileScanner widget
2019
final void Function(BarcodeCapture)? onDetect;
2120

22-
/// Validate barcode text with [ValidateType]
23-
/// [validateText] and [validateType] must be set together.
24-
/// [validateText] now deprecated, use [validator] instead.
25-
@Deprecated('Use [validator] instead. This will be removed in next version.')
26-
final String? validateText;
27-
28-
/// Validate type [ValidateType]
29-
/// Validator working with single string value only.
30-
/// [validateText] and [validateType] now deprecated, use [validator] instead.
31-
@Deprecated('Use [validator] instead. This will be removed in next version.')
32-
final ValidateType? validateType;
33-
3421
/// Validate barcode text with a function
3522
final bool Function(String value)? validator;
3623

@@ -184,13 +171,7 @@ class AiBarcodeScanner extends StatefulWidget {
184171
this.scanWindow,
185172
this.startDelay,
186173
this.hintWidget,
187-
@Deprecated('Use [validator] instead. This will be removed in next version.')
188-
this.validateText,
189-
@Deprecated('Use [validator] instead. This will be removed in next version.')
190-
this.validateType,
191-
}) : assert(validateText == null || validateType != null),
192-
assert(validateText != null || validateType == null),
193-
super(key: key);
174+
}) : super(key: key);
194175

195176
@override
196177
State<AiBarcodeScanner> createState() => _AiBarcodeScannerState();
@@ -234,14 +215,14 @@ class _AiBarcodeScannerState extends State<AiBarcodeScanner> {
234215
fit: widget.fit,
235216
errorBuilder: widget.errorBuilder ??
236217
(context, error, child) {
237-
return ColoredBox(
218+
return const ColoredBox(
238219
color: Colors.black,
239220
child: Center(
240221
child: Column(
241222
mainAxisAlignment: MainAxisAlignment.center,
242223
crossAxisAlignment: CrossAxisAlignment.center,
243224
mainAxisSize: MainAxisSize.min,
244-
children: const [
225+
children: [
245226
Icon(
246227
Icons.no_photography,
247228
color: Colors.white,
@@ -272,12 +253,7 @@ class _AiBarcodeScannerState extends State<AiBarcodeScanner> {
272253

273254
final String code = barcode.barcodes.first.rawValue ?? "";
274255

275-
if ((widget.validator != null && !widget.validator!(code)) ||
276-
(widget.validateText?.isNotEmpty == true &&
277-
!widget.validateType!.toValidateTypeBool(
278-
code,
279-
widget.validateText!,
280-
))) {
256+
if ((widget.validator != null && !widget.validator!(code))) {
281257
setState(() {
282258
HapticFeedback.heavyImpact();
283259
log('Invalid Barcode => $code');

lib/src/enums/validate_type.dart

Lines changed: 0 additions & 30 deletions
This file was deleted.

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: ai_barcode_scanner
22
description: A universal AI barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
3-
version: 0.0.6
3+
version: 0.0.7
44
homepage: https://mohesu.com
55
repository: https://github.com/mohesu/barcode_scanner.git
66

77
environment:
8-
sdk: ">=2.17.6 <3.0.0"
8+
sdk: ">=2.17.6 <4.0.0"
99
flutter: ">=1.17.0"
1010

1111
dependencies:
1212
flutter:
1313
sdk: flutter
1414

15-
mobile_scanner: ^3.2.0
15+
mobile_scanner: ^3.3.0
1616

1717
dev_dependencies:
1818
flutter_test:

0 commit comments

Comments
 (0)