check null safety
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class FlavorBanner extends StatelessWidget {
|
||||
final Widget child;
|
||||
FlavorBanner({@required this.child});
|
||||
FlavorBanner({required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:barcode_scan/barcode_scan.dart';
|
||||
import 'package:barcode_scan2/platform_wrapper.dart';
|
||||
|
||||
Future<String> scanBarcode() async {
|
||||
Future<String?> scanBarcode() async {
|
||||
try {
|
||||
String barcode = await BarcodeScanner.scan();
|
||||
if (barcode == null) return null;
|
||||
var scanResult = await BarcodeScanner.scan();
|
||||
String barcode = scanResult.rawContent;
|
||||
|
||||
String gs = String.fromCharCode(29);
|
||||
if (barcode.contains(gs)) {
|
||||
|
||||
@@ -13,7 +13,7 @@ class BottomWidgets extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
var pkgInfo = Provider.of<MainModel>(context).packageInfo;
|
||||
final versionBox = Text(
|
||||
"v${pkgInfo.version}+${pkgInfo.buildNumber}",
|
||||
"v${pkgInfo?.version}+${pkgInfo?.buildNumber}",
|
||||
style: TextStyle(color: Colors.white30),
|
||||
);
|
||||
return Column(
|
||||
|
||||
Reference in New Issue
Block a user