Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Pierre Slamich
2023-06-09 14:47:35 +0200
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2023-06-09 14:47:35 +0200
Commit
48ac5414e8a0f9e00f40f7829c1f5160fa477963
48ac5414
2 parents
38f05c52
5aa2c119
Merge branch 'master' into dependabot/gradle/android/androidx.camera-camera-lifecycle-1.2.3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
10 deletions
.github/workflows/flutter.yml
analysis_options.yaml
lib/mobile_scanner.dart
lib/mobile_scanner_web.dart
lib/src/mobile_scanner_controller.dart
lib/src/web/utils.dart
test/mobile_scanner_test.dart
.github/workflows/flutter.yml
View file @
48ac541
...
...
@@ -37,4 +37,4 @@ jobs:
with
:
cache
:
true
-
name
:
Format
run
:
dart format -
n -
-set-exit-if-changed .
run
:
dart format --set-exit-if-changed .
...
...
analysis_options.yaml
View file @
48ac541
include
:
package:lint/analysis_options_package.yaml
linter
:
rules
:
-
combinators_ordering
-
require_trailing_commas
-
unnecessary_library_directive
\ No newline at end of file
...
...
lib/mobile_scanner.dart
View file @
48ac541
library
mobile_scanner
;
export
'src/enums/camera_facing.dart'
;
export
'src/enums/detection_speed.dart'
;
export
'src/enums/mobile_scanner_error_code.dart'
;
...
...
lib/mobile_scanner_web.dart
View file @
48ac541
library
mobile_scanner_web
;
export
'src/web/base.dart'
;
export
'src/web/jsqr.dart'
;
export
'src/web/zxing.dart'
;
...
...
lib/src/mobile_scanner_controller.dart
View file @
48ac541
...
...
@@ -18,7 +18,9 @@ class MobileScannerController {
this
.
torchEnabled
=
false
,
this
.
formats
,
this
.
returnImage
=
false
,
@Deprecated
(
'Instead, use the result of calling `start()` to determine if permissions were granted.'
)
@Deprecated
(
'Instead, use the result of calling `start()` to determine if permissions were granted.'
,
)
this
.
onPermissionSet
,
this
.
autoStart
=
true
,
});
...
...
lib/src/web/utils.dart
View file @
48ac541
import
'dart:async'
;
import
'dart:html'
as
html
;
import
'dart:js'
show
context
,
JsObjec
t
;
import
'dart:js'
show
JsObject
,
contex
t
;
import
'package:mobile_scanner/src/web/base.dart'
;
...
...
test/mobile_scanner_test.dart
View file @
48ac541
...
...
@@ -7,12 +7,20 @@ void main() {
TestWidgetsFlutterBinding
.
ensureInitialized
();
setUp
(()
{
channel
.
setMockMethodCallHandler
((
MethodCall
methodCall
)
async
{
TestDefaultBinaryMessengerBinding
.
instance
.
defaultBinaryMessenger
.
setMockMethodCallHandler
(
channel
,
(
MethodCall
methodCall
)
async
{
return
'42'
;
});
},
);
});
tearDown
(()
{
channel
.
setMockMethodCallHandler
(
null
);
TestDefaultBinaryMessengerBinding
.
instance
.
defaultBinaryMessenger
.
setMockMethodCallHandler
(
channel
,
null
,
);
});
}
...
...
Please
register
or
login
to post a comment