Skip to content

Commit 0014de5

Browse files
committed
back button/title added for window and web scan page
1 parent e6fa7d1 commit 0014de5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

lib/constant.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ class PackageConstant {
44
static const barcodeFileWebPath =
55
"assets/packages/simple_barcode_scanner/assets/barcode.html";
66
}
7+
8+
String kScanPageTitle = 'Scan barcode/qrcode';

lib/screens/web.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class BarcodeScanner extends StatelessWidget {
4646
.registerViewFactory(createdViewId, (int viewId) => iframe);
4747

4848
return Scaffold(
49+
appBar: AppBar(
50+
title: Text(kScanPageTitle),
51+
),
4952
body: HtmlElementView(
5053
viewType: createdViewId,
5154
),

lib/screens/window.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class WindowBarcodeScanner extends StatelessWidget {
2626
WebviewController controller = WebviewController();
2727
bool isPermissionGranted = false;
2828
return Scaffold(
29-
appBar: AppBar(),
29+
appBar: AppBar(
30+
title: Text(kScanPageTitle),
31+
),
3032
body: FutureBuilder<bool>(
3133
future: initPlatformState(
3234
controller: controller,

0 commit comments

Comments
 (0)