Browse Source

bug fixes

pull/89/head
Khoren Markosyan 2 years ago
parent
commit
3a3896dced
  1. 208
      example/pubspec.lock
  2. 21
      lib/src/ui/reader_widget.dart
  3. 152
      zxscanner/pubspec.lock

208
example/pubspec.lock

@ -1,6 +1,14 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
ansi_styles:
dependency: transitive
description:
name: ansi_styles
sha256: "9c656cc12b3c27b17dd982b2cc5c0cfdfbdabd7bc8f3ae5e8542d9867b47ce8a"
url: "https://pub.dev"
source: hosted
version: "0.3.2+1"
archive:
dependency: transitive
description:
@ -9,6 +17,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.3.6"
args:
dependency: transitive
description:
name: args
sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
async:
dependency: transitive
description:
@ -37,10 +53,10 @@ packages:
dependency: transitive
description:
name: camera_android
sha256: "16e46b32915fcbc53afc1f96ca868cd91495608935a20bd16f47b854bfed9b17"
sha256: "772c111c78f31f868b98dbf6dbeda8d6ff77acea773a92ea5705ee2f7949ebfb"
url: "https://pub.dev"
source: hosted
version: "0.10.4+3"
version: "0.10.5"
camera_avfoundation:
dependency: transitive
description:
@ -53,10 +69,10 @@ packages:
dependency: transitive
description:
name: camera_platform_interface
sha256: "00d972adee2e8a282b4d7445e8e694aa1dc0c36b70455b99afa96fbf5e814119"
sha256: "525017018d116c5db8c4c43ec2d9b1663216b369c9f75149158280168a7ce472"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.5.0"
camera_web:
dependency: transitive
description:
@ -73,6 +89,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
url: "https://pub.dev"
source: hosted
version: "1.3.1"
cli_launcher:
dependency: transitive
description:
name: cli_launcher
sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c"
url: "https://pub.dev"
source: hosted
version: "0.3.5"
clock:
dependency: transitive
description:
@ -89,6 +129,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.0"
conventional_commit:
dependency: transitive
description:
name: conventional_commit
sha256: "8eee25c315cf1946215d02d598402ca75cfee8a8ab482f3fac34cb0717323afa"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
convert:
dependency: transitive
description:
@ -129,6 +177,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.dev"
source: hosted
version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
@ -167,6 +223,22 @@ packages:
relative: true
source: path
version: "1.1.1"
glob:
dependency: transitive
description:
name: glob
sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
graphs:
dependency: transitive
description:
name: graphs
sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2
url: "https://pub.dev"
source: hosted
version: "2.2.0"
http:
dependency: transitive
description:
@ -195,18 +267,18 @@ packages:
dependency: transitive
description:
name: image_picker
sha256: "64b21d9f0e065f9ab0e4dde458076226c97382cc0c6949144cb874c62bf8e9f8"
sha256: cb25f04595a88450970dbe727243ba8cd21b6f7e0d7d1fc5b789fc6f52e95494
url: "https://pub.dev"
source: hosted
version: "0.8.7"
version: "0.8.7+1"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "420ed22d2c9ce767ed96df723aaebfeb20ce92dfda8665cd2ba72d72a51ae669"
sha256: dfb5b0f28b8786fcc662b7ed42bfb4b82a6cbbd74da1958384b10d40bdf212a7
url: "https://pub.dev"
source: hosted
version: "0.8.6+1"
version: "0.8.6+6"
image_picker_for_web:
dependency: transitive
description:
@ -219,10 +291,10 @@ packages:
dependency: transitive
description:
name: image_picker_ios
sha256: "50e882fe0a06bf0c8f7f5bce78d30975f279213293afc9471dc35f05617c50ff"
sha256: d4cb8ab04f770dab9d04c7959e5f6d22e8c5280343d425f9344f93832cf58445
url: "https://pub.dev"
source: hosted
version: "0.8.7+1"
version: "0.8.7+2"
image_picker_platform_interface:
dependency: transitive
description:
@ -231,6 +303,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.6.3"
io:
dependency: transitive
description:
name: io
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
js:
dependency: transitive
description:
@ -239,6 +319,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.5"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
url: "https://pub.dev"
source: hosted
version: "4.8.0"
lints:
dependency: transitive
description:
@ -263,6 +351,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.0"
melos:
dependency: transitive
description:
name: melos
sha256: cd8e7db0250ee822c5354a8214afc751b6c1c41aadfbbef927456d509d953244
url: "https://pub.dev"
source: hosted
version: "3.0.0"
meta:
dependency: transitive
description:
@ -271,6 +367,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.0"
mustache_template:
dependency: transitive
description:
name: mustache_template
sha256: a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c
url: "https://pub.dev"
source: hosted
version: "2.0.0"
path:
dependency: transitive
description:
@ -287,6 +391,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.1.0"
platform:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
@ -299,10 +411,58 @@ packages:
dependency: transitive
description:
name: pointycastle
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
sha256: c3120a968135aead39699267f4c74bc9a08e4e909e86bc1b0af5bfd78691123c
url: "https://pub.dev"
source: hosted
version: "3.6.2"
version: "3.7.2"
pool:
dependency: transitive
description:
name: pool
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
url: "https://pub.dev"
source: hosted
version: "1.5.1"
process:
dependency: transitive
description:
name: process
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
prompts:
dependency: transitive
description:
name: prompts
sha256: "3773b845e85a849f01e793c4fc18a45d52d7783b4cb6c0569fad19f9d0a774a1"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
pub_semver:
dependency: transitive
description:
name: pub_semver
sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
pub_updater:
dependency: transitive
description:
name: pub_updater
sha256: "42890302ab2672adf567dc2b20e55b4ecc29d7e19c63b6b98143ab68dd717d3a"
url: "https://pub.dev"
source: hosted
version: "0.2.4"
pubspec:
dependency: transitive
description:
name: pubspec
sha256: f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e
url: "https://pub.dev"
source: hosted
version: "2.3.0"
quiver:
dependency: transitive
description:
@ -380,6 +540,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
uri:
dependency: transitive
description:
name: uri
sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
vector_math:
dependency: transitive
description:
@ -396,6 +564,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.2.2"
yaml:
dependency: transitive
description:
name: yaml
sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
yaml_edit:
dependency: transitive
description:
name: yaml_edit
sha256: "0b968021754d8fbd3e9c83563b538ee417d88b2cc587606da5615546b7ee033b"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.3.0"

21
lib/src/ui/reader_widget.dart

@ -230,13 +230,13 @@ class _ReaderWidgetState extends State<ReaderWidget>
cameraDescription,
widget.resolution,
enableAudio: false,
imageFormatGroup:
isAndroid() ? ImageFormatGroup.yuv420 : ImageFormatGroup.yuv420,
imageFormatGroup: ImageFormatGroup.yuv420,
);
controller = cameraController;
cameraController.addListener(rebuildOnMount);
try {
await cameraController.initialize();
widget.onControllerCreated?.call(controller);
cameraController.addListener(rebuildOnMount);
cameraController.startImageStream(processImageStream);
} on CameraException catch (e) {
debugPrint('${e.code}: ${e.description}');
@ -244,13 +244,6 @@ class _ReaderWidgetState extends State<ReaderWidget>
debugPrint('Error: $e');
}
try {
await cameraController.setFlashMode(FlashMode.off);
} catch (e) {
_isFlashAvailable = false;
debugPrint('Error: $e');
}
try {
cameraController
.getMaxZoomLevel()
@ -262,8 +255,14 @@ class _ReaderWidgetState extends State<ReaderWidget>
debugPrint('Error: $e');
}
try {
await cameraController.setFlashMode(FlashMode.off);
} catch (e) {
_isFlashAvailable = false;
debugPrint('Error: $e');
}
rebuildOnMount();
widget.onControllerCreated?.call(controller);
}
Future<void> processImageStream(CameraImage image) async {

152
zxscanner/pubspec.lock

@ -5,18 +5,26 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "98d1d33ed129b372846e862de23a0fc365745f4d7b5e786ce667fcbbb7ac5c07"
sha256: a36ec4843dc30ea6bf652bf25e3448db6c5e8bcf4aa55f063a5d1dad216d8214
url: "https://pub.dev"
source: hosted
version: "55.0.0"
version: "58.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "881348aed9b0b425882c97732629a6a31093c8ff20fc4b3b03fb9d3d50a3a126"
sha256: cc4242565347e98424ce9945c819c192ec0838cb9d1f6aa4a97cc96becbc5b27
url: "https://pub.dev"
source: hosted
version: "5.7.1"
version: "5.10.0"
ansi_styles:
dependency: transitive
description:
name: ansi_styles
sha256: "9c656cc12b3c27b17dd982b2cc5c0cfdfbdabd7bc8f3ae5e8542d9867b47ce8a"
url: "https://pub.dev"
source: hosted
version: "0.3.2+1"
archive:
dependency: transitive
description:
@ -125,10 +133,10 @@ packages:
dependency: transitive
description:
name: camera_android
sha256: "16e46b32915fcbc53afc1f96ca868cd91495608935a20bd16f47b854bfed9b17"
sha256: "772c111c78f31f868b98dbf6dbeda8d6ff77acea773a92ea5705ee2f7949ebfb"
url: "https://pub.dev"
source: hosted
version: "0.10.4+3"
version: "0.10.5"
camera_avfoundation:
dependency: transitive
description:
@ -141,10 +149,10 @@ packages:
dependency: transitive
description:
name: camera_platform_interface
sha256: "00d972adee2e8a282b4d7445e8e694aa1dc0c36b70455b99afa96fbf5e814119"
sha256: "525017018d116c5db8c4c43ec2d9b1663216b369c9f75149158280168a7ce472"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.5.0"
camera_web:
dependency: transitive
description:
@ -161,6 +169,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
url: "https://pub.dev"
source: hosted
version: "1.3.1"
checked_yaml:
dependency: transitive
description:
@ -169,6 +185,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.2"
cli_launcher:
dependency: transitive
description:
name: cli_launcher
sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c"
url: "https://pub.dev"
source: hosted
version: "0.3.5"
clock:
dependency: transitive
description:
@ -193,6 +225,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.0"
conventional_commit:
dependency: transitive
description:
name: conventional_commit
sha256: "8eee25c315cf1946215d02d598402ca75cfee8a8ab482f3fac34cb0717323afa"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
convert:
dependency: transitive
description:
@ -293,10 +333,10 @@ packages:
dependency: transitive
description:
name: flex_seed_scheme
sha256: e61950ccadfb8d43ce5cdef382e8f689edc053ce6b837e277539410ecfb3b3e5
sha256: "7058288ef97d348657ac95cea25d65a9aac181ca08387ede891fd7230ad7600f"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
version: "1.2.3"
flutter:
dependency: "direct main"
description: flutter
@ -472,18 +512,18 @@ packages:
dependency: "direct main"
description:
name: image_picker
sha256: "64b21d9f0e065f9ab0e4dde458076226c97382cc0c6949144cb874c62bf8e9f8"
sha256: cb25f04595a88450970dbe727243ba8cd21b6f7e0d7d1fc5b789fc6f52e95494
url: "https://pub.dev"
source: hosted
version: "0.8.7"
version: "0.8.7+1"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "420ed22d2c9ce767ed96df723aaebfeb20ce92dfda8665cd2ba72d72a51ae669"
sha256: dfb5b0f28b8786fcc662b7ed42bfb4b82a6cbbd74da1958384b10d40bdf212a7
url: "https://pub.dev"
source: hosted
version: "0.8.6+1"
version: "0.8.6+6"
image_picker_for_web:
dependency: transitive
description:
@ -496,10 +536,10 @@ packages:
dependency: transitive
description:
name: image_picker_ios
sha256: "50e882fe0a06bf0c8f7f5bce78d30975f279213293afc9471dc35f05617c50ff"
sha256: d4cb8ab04f770dab9d04c7959e5f6d22e8c5280343d425f9344f93832cf58445
url: "https://pub.dev"
source: hosted
version: "0.8.7+1"
version: "0.8.7+2"
image_picker_platform_interface:
dependency: transitive
description:
@ -580,6 +620,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.0"
melos:
dependency: transitive
description:
name: melos
sha256: cd8e7db0250ee822c5354a8214afc751b6c1c41aadfbbef927456d509d953244
url: "https://pub.dev"
source: hosted
version: "3.0.0"
meta:
dependency: transitive
description:
@ -612,6 +660,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
mustache_template:
dependency: transitive
description:
name: mustache_template
sha256: a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c
url: "https://pub.dev"
source: hosted
version: "2.0.0"
package_config:
dependency: transitive
description:
@ -632,10 +688,10 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9"
sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4
url: "https://pub.dev"
source: hosted
version: "2.0.13"
version: "2.0.14"
path_provider_android:
dependency: transitive
description:
@ -648,10 +704,10 @@ packages:
dependency: transitive
description:
name: path_provider_foundation
sha256: "026b97a6c29da75181a37aae2eba9227f5fe13cb2838c6b975ce209328b8ab4e"
sha256: "818b2dc38b0f178e0ea3f7cf3b28146faab11375985d815942a68eee11c2d0f7"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.2.1"
path_provider_linux:
dependency: transitive
description:
@ -704,10 +760,10 @@ packages:
dependency: transitive
description:
name: pointycastle
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
sha256: c3120a968135aead39699267f4c74bc9a08e4e909e86bc1b0af5bfd78691123c
url: "https://pub.dev"
source: hosted
version: "3.6.2"
version: "3.7.2"
pool:
dependency: transitive
description:
@ -724,6 +780,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.2.4"
prompts:
dependency: transitive
description:
name: prompts
sha256: "3773b845e85a849f01e793c4fc18a45d52d7783b4cb6c0569fad19f9d0a774a1"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
pub_semver:
dependency: transitive
description:
@ -732,6 +796,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.3"
pub_updater:
dependency: transitive
description:
name: pub_updater
sha256: "42890302ab2672adf567dc2b20e55b4ecc29d7e19c63b6b98143ab68dd717d3a"
url: "https://pub.dev"
source: hosted
version: "0.2.4"
pubspec:
dependency: transitive
description:
name: pubspec
sha256: f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e
url: "https://pub.dev"
source: hosted
version: "2.3.0"
pubspec_parse:
dependency: transitive
description:
@ -768,10 +848,10 @@ packages:
dependency: "direct main"
description:
name: shared_preferences
sha256: ee6257848f822b8481691f20c3e6d2bfee2e9eccb2a3d249907fcfb198c55b41
sha256: "78528fd87d0d08ffd3e69551173c026e8eacc7b7079c82eb6a77413957b7e394"
url: "https://pub.dev"
source: hosted
version: "2.0.18"
version: "2.0.20"
shared_preferences_android:
dependency: transitive
description:
@ -937,6 +1017,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.0"
uri:
dependency: transitive
description:
name: uri
sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
url_launcher:
dependency: "direct main"
description:
@ -949,18 +1037,18 @@ packages:
dependency: transitive
description:
name: url_launcher_android
sha256: "845530e5e05db5500c1a4c1446785d60cbd8f9bd45e21e7dd643a3273bb4bbd1"
sha256: dd729390aa936bf1bdf5cd1bc7468ff340263f80a2c4f569416507667de8e3c8
url: "https://pub.dev"
source: hosted
version: "6.0.25"
version: "6.0.26"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "7ab1e5b646623d6a2537aa59d5d039f90eebef75a7c25e105f6f75de1f7750c3"
sha256: "3dedc66ca3c0bef9e6a93c0999aee102556a450afcc1b7bcfeace7a424927d92"
url: "https://pub.dev"
source: hosted
version: "6.1.2"
version: "6.1.3"
url_launcher_linux:
dependency: transitive
description:
@ -1065,6 +1153,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
yaml_edit:
dependency: transitive
description:
name: yaml_edit
sha256: "0b968021754d8fbd3e9c83563b538ee417d88b2cc587606da5615546b7ee033b"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.7.0"

Loading…
Cancel
Save