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
2023-06-28 10:56:17 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bc8023f9ebc12f4d9ae8e5aa77be2ec6ce56188a
bc8023f9
1 parent
1b93198b
add back buttons to pages; fix error builder for window page & zoom slider page
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
0 deletions
example/lib/barcode_list_scanner_controller.dart
example/lib/barcode_scanner_controller.dart
example/lib/barcode_scanner_pageview.dart
example/lib/barcode_scanner_returning_image.dart
example/lib/barcode_scanner_window.dart
example/lib/barcode_scanner_without_controller.dart
example/lib/barcode_scanner_zoom.dart
example/lib/barcode_list_scanner_controller.dart
View file @
bc8023f
...
...
@@ -50,6 +50,7 @@ class _BarcodeListScannerWithControllerState
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'With ValueListenableBuilder'
)),
backgroundColor:
Colors
.
black
,
body:
Builder
(
builder:
(
context
)
{
...
...
example/lib/barcode_scanner_controller.dart
View file @
bc8023f
...
...
@@ -50,6 +50,7 @@ class _BarcodeScannerWithControllerState
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'With controller'
)),
backgroundColor:
Colors
.
black
,
body:
Builder
(
builder:
(
context
)
{
...
...
example/lib/barcode_scanner_pageview.dart
View file @
bc8023f
...
...
@@ -70,6 +70,7 @@ class _BarcodeScannerPageViewState extends State<BarcodeScannerPageView>
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'With PageView'
)),
backgroundColor:
Colors
.
black
,
body:
PageView
(
children:
[
...
...
example/lib/barcode_scanner_returning_image.dart
View file @
bc8023f
...
...
@@ -52,6 +52,7 @@ class _BarcodeScannerReturningImageState
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Returning image'
)),
body:
SafeArea
(
child:
Column
(
children:
[
...
...
example/lib/barcode_scanner_window.dart
View file @
bc8023f
...
...
@@ -3,6 +3,8 @@ import 'dart:io';
import
'package:flutter/material.dart'
;
import
'package:mobile_scanner/mobile_scanner.dart'
;
import
'package:mobile_scanner_example/scanner_error_widget.dart'
;
class
BarcodeScannerWithScanWindow
extends
StatefulWidget
{
const
BarcodeScannerWithScanWindow
({
Key
?
key
})
:
super
(
key:
key
);
...
...
@@ -32,6 +34,7 @@ class _BarcodeScannerWithScanWindowState
height:
200
,
);
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'With Scan window'
)),
backgroundColor:
Colors
.
black
,
body:
Builder
(
builder:
(
context
)
{
...
...
@@ -47,6 +50,9 @@ class _BarcodeScannerWithScanWindowState
this
.
arguments
=
arguments
;
});
},
errorBuilder:
(
context
,
error
,
child
)
{
return
ScannerErrorWidget
(
error:
error
);
},
onDetect:
onDetect
,
),
if
(
barcode
!=
null
&&
...
...
example/lib/barcode_scanner_without_controller.dart
View file @
bc8023f
...
...
@@ -18,6 +18,7 @@ class _BarcodeScannerWithoutControllerState
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Without controller'
)),
backgroundColor:
Colors
.
black
,
body:
Builder
(
builder:
(
context
)
{
...
...
example/lib/barcode_scanner_zoom.dart
View file @
bc8023f
...
...
@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import
'package:image_picker/image_picker.dart'
;
import
'package:mobile_scanner/mobile_scanner.dart'
;
import
'package:mobile_scanner_example/scanner_error_widget.dart'
;
class
BarcodeScannerWithZoom
extends
StatefulWidget
{
const
BarcodeScannerWithZoom
({
Key
?
key
})
:
super
(
key:
key
);
...
...
@@ -23,6 +25,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom>
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'With zoom slider'
)),
backgroundColor:
Colors
.
black
,
body:
Builder
(
builder:
(
context
)
{
...
...
@@ -31,6 +34,9 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom>
MobileScanner
(
controller:
controller
,
fit:
BoxFit
.
contain
,
errorBuilder:
(
context
,
error
,
child
)
{
return
ScannerErrorWidget
(
error:
error
);
},
onDetect:
(
barcode
)
{
setState
(()
{
this
.
barcode
=
barcode
;
...
...
Please
register
or
login
to post a comment