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
Navaron Bracke
2022-11-20 14:47:01 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a39ac8703fdb4d9caf280c2330b3153a3aab3234
a39ac870
1 parent
d42ae7ee
export mobile scanner exception & error code; fix typo
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
lib/mobile_scanner.dart
lib/src/enums/mobile_scanner_error_code.dart
lib/src/mobile_scanner_controller.dart
lib/mobile_scanner.dart
View file @
a39ac87
...
...
@@ -2,11 +2,13 @@ library mobile_scanner;
export
'src/enums/camera_facing.dart'
;
export
'src/enums/detection_speed.dart'
;
export
'src/enums/mobile_scanner_error_code.dart'
;
export
'src/enums/mobile_scanner_state.dart'
;
export
'src/enums/ratio.dart'
;
export
'src/enums/torch_state.dart'
;
export
'src/mobile_scanner.dart'
;
export
'src/mobile_scanner_controller.dart'
;
export
'src/mobile_scanner_exception.dart'
;
export
'src/objects/barcode.dart'
;
export
'src/objects/barcode_capture.dart'
;
export
'src/objects/mobile_scanner_arguments.dart'
;
...
...
lib/src/enums/mobile_scanner_error_code.dart
View file @
a39ac87
...
...
@@ -2,7 +2,7 @@
enum
MobileScannerErrorCode
{
/// The controller was used
/// while it was not yet initialized using [MobileScannerController.start].
controllerUni
t
itialized
,
controllerUni
n
itialized
,
/// A generic error occurred.
///
...
...
lib/src/mobile_scanner_controller.dart
View file @
a39ac87
...
...
@@ -6,8 +6,6 @@ import 'package:flutter/foundation.dart';
import
'package:flutter/services.dart'
;
import
'package:mobile_scanner/mobile_scanner.dart'
;
import
'package:mobile_scanner/src/barcode_utility.dart'
;
import
'package:mobile_scanner/src/enums/mobile_scanner_error_code.dart'
;
import
'package:mobile_scanner/src/mobile_scanner_exception.dart'
;
/// The [MobileScannerController] holds all the logic of this plugin,
/// where as the [MobileScanner] class is the frontend of this plugin.
...
...
@@ -235,7 +233,7 @@ class MobileScannerController {
if
(
hasTorch
==
null
)
{
throw
const
MobileScannerException
(
errorCode:
MobileScannerErrorCode
.
controllerUni
t
itialized
,
errorCode:
MobileScannerErrorCode
.
controllerUni
n
itialized
,
);
}
else
if
(!
hasTorch
)
{
return
;
...
...
Please
register
or
login
to post a comment