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:27 +0200
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2023-06-09 14:47:27 +0200
Commit
04225e78c671a6a45d8ae73fb7dc05c82b1d9800
04225e78
2 parents
276e0110
5aa2c119
Merge branch 'master' into dependabot/gradle/android/androidx.camera-camera-camera2-1.2.3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
13 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 @
04225e7
...
...
@@ -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 @
04225e7
include
:
package:lint/analysis_options_package.yaml
\ No newline at end of file
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 @
04225e7
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 @
04225e7
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 @
04225e7
...
...
@@ -18,8 +18,10 @@ class MobileScannerController {
this
.
torchEnabled
=
false
,
this
.
formats
,
this
.
returnImage
=
false
,
@Deprecated
(
'Instead, use the result of calling `start()` to determine if permissions were granted.'
)
this
.
onPermissionSet
,
@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 @
04225e7
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 @
04225e7
...
...
@@ -7,12 +7,20 @@ void main() {
TestWidgetsFlutterBinding
.
ensureInitialized
();
setUp
(()
{
channel
.
setMockMethodCallHandler
((
MethodCall
methodCall
)
async
{
return
'42'
;
});
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