Showing
9 changed files
with
10 additions
and
11 deletions
| @@ -99,7 +99,7 @@ class _BarcodeScannerWithControllerState | @@ -99,7 +99,7 @@ class _BarcodeScannerWithControllerState | ||
| 99 | child: Container( | 99 | child: Container( |
| 100 | alignment: Alignment.bottomCenter, | 100 | alignment: Alignment.bottomCenter, |
| 101 | height: 100, | 101 | height: 100, |
| 102 | - color: Colors.black.withOpacity(0.4), | 102 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 103 | child: Row( | 103 | child: Row( |
| 104 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, | 104 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
| 105 | children: [ | 105 | children: [ |
| @@ -68,7 +68,7 @@ class _BarcodeScannerListViewState extends State<BarcodeScannerListView> { | @@ -68,7 +68,7 @@ class _BarcodeScannerListViewState extends State<BarcodeScannerListView> { | ||
| 68 | child: Container( | 68 | child: Container( |
| 69 | alignment: Alignment.bottomCenter, | 69 | alignment: Alignment.bottomCenter, |
| 70 | height: 100, | 70 | height: 100, |
| 71 | - color: Colors.black.withOpacity(0.4), | 71 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 72 | child: Column( | 72 | child: Column( |
| 73 | children: [ | 73 | children: [ |
| 74 | Expanded( | 74 | Expanded( |
| @@ -78,7 +78,7 @@ class _BarcodeScannerPage extends StatelessWidget { | @@ -78,7 +78,7 @@ class _BarcodeScannerPage extends StatelessWidget { | ||
| 78 | child: Container( | 78 | child: Container( |
| 79 | alignment: Alignment.bottomCenter, | 79 | alignment: Alignment.bottomCenter, |
| 80 | height: 100, | 80 | height: 100, |
| 81 | - color: Colors.black.withOpacity(0.4), | 81 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 82 | child: Center( | 82 | child: Center( |
| 83 | child: ScannedBarcodeLabel(barcodes: controller.barcodes), | 83 | child: ScannedBarcodeLabel(barcodes: controller.barcodes), |
| 84 | ), | 84 | ), |
| @@ -97,7 +97,7 @@ class _BarcodeScannerReturningImageState | @@ -97,7 +97,7 @@ class _BarcodeScannerReturningImageState | ||
| 97 | child: Container( | 97 | child: Container( |
| 98 | alignment: Alignment.bottomCenter, | 98 | alignment: Alignment.bottomCenter, |
| 99 | height: 100, | 99 | height: 100, |
| 100 | - color: Colors.black.withOpacity(0.4), | 100 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 101 | child: Row( | 101 | child: Row( |
| 102 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, | 102 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
| 103 | children: [ | 103 | children: [ |
| @@ -50,7 +50,7 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> { | @@ -50,7 +50,7 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> { | ||
| 50 | child: Container( | 50 | child: Container( |
| 51 | alignment: Alignment.bottomCenter, | 51 | alignment: Alignment.bottomCenter, |
| 52 | height: 100, | 52 | height: 100, |
| 53 | - color: Colors.black.withOpacity(0.4), | 53 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 54 | child: Row( | 54 | child: Row( |
| 55 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, | 55 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
| 56 | children: [ | 56 | children: [ |
| @@ -108,7 +108,7 @@ class _BarcodeScannerWithScanWindowState | @@ -108,7 +108,7 @@ class _BarcodeScannerWithScanWindowState | ||
| 108 | alignment: Alignment.center, | 108 | alignment: Alignment.center, |
| 109 | padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), | 109 | padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), |
| 110 | height: 100, | 110 | height: 100, |
| 111 | - color: Colors.black.withOpacity(0.4), | 111 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 112 | child: ScannedBarcodeLabel(barcodes: controller.barcodes), | 112 | child: ScannedBarcodeLabel(barcodes: controller.barcodes), |
| 113 | ), | 113 | ), |
| 114 | ), | 114 | ), |
| @@ -137,7 +137,7 @@ class ScannerOverlay extends CustomPainter { | @@ -137,7 +137,7 @@ class ScannerOverlay extends CustomPainter { | ||
| 137 | final cutoutPath = Path()..addRect(scanWindow); | 137 | final cutoutPath = Path()..addRect(scanWindow); |
| 138 | 138 | ||
| 139 | final backgroundPaint = Paint() | 139 | final backgroundPaint = Paint() |
| 140 | - ..color = Colors.black.withOpacity(0.5) | 140 | + ..color = const Color.fromRGBO(0, 0, 0, 0.5) |
| 141 | ..style = PaintingStyle.fill | 141 | ..style = PaintingStyle.fill |
| 142 | ..blendMode = BlendMode.dstOver; | 142 | ..blendMode = BlendMode.dstOver; |
| 143 | 143 | ||
| @@ -214,7 +214,7 @@ class BarcodeOverlay extends CustomPainter { | @@ -214,7 +214,7 @@ class BarcodeOverlay extends CustomPainter { | ||
| 214 | final cutoutPath = Path()..addPolygon(adjustedOffset, true); | 214 | final cutoutPath = Path()..addPolygon(adjustedOffset, true); |
| 215 | 215 | ||
| 216 | final backgroundPaint = Paint() | 216 | final backgroundPaint = Paint() |
| 217 | - ..color = Colors.red.withOpacity(0.3) | 217 | + ..color = const Color(0x4DF44336) |
| 218 | ..style = PaintingStyle.fill | 218 | ..style = PaintingStyle.fill |
| 219 | ..blendMode = BlendMode.dstOut; | 219 | ..blendMode = BlendMode.dstOut; |
| 220 | 220 |
| @@ -86,7 +86,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> { | @@ -86,7 +86,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> { | ||
| 86 | child: Container( | 86 | child: Container( |
| 87 | alignment: Alignment.bottomCenter, | 87 | alignment: Alignment.bottomCenter, |
| 88 | height: 100, | 88 | height: 100, |
| 89 | - color: Colors.black.withOpacity(0.4), | 89 | + color: const Color.fromRGBO(0, 0, 0, 0.4), |
| 90 | child: Column( | 90 | child: Column( |
| 91 | children: [ | 91 | children: [ |
| 92 | if (!kIsWeb) _buildZoomScaleSlider(), | 92 | if (!kIsWeb) _buildZoomScaleSlider(), |
| @@ -118,7 +118,7 @@ class ScannerOverlay extends CustomPainter { | @@ -118,7 +118,7 @@ class ScannerOverlay extends CustomPainter { | ||
| 118 | ); | 118 | ); |
| 119 | 119 | ||
| 120 | final backgroundPaint = Paint() | 120 | final backgroundPaint = Paint() |
| 121 | - ..color = Colors.black.withOpacity(0.5) | 121 | + ..color = const Color.fromRGBO(0, 0, 0, 0.5) |
| 122 | ..style = PaintingStyle.fill | 122 | ..style = PaintingStyle.fill |
| 123 | ..blendMode = BlendMode.dstOver; | 123 | ..blendMode = BlendMode.dstOver; |
| 124 | 124 |
| @@ -19,7 +19,6 @@ class ScannerErrorWidget extends StatelessWidget { | @@ -19,7 +19,6 @@ class ScannerErrorWidget extends StatelessWidget { | ||
| 19 | errorMessage = 'Scanning is unsupported on this device'; | 19 | errorMessage = 'Scanning is unsupported on this device'; |
| 20 | default: | 20 | default: |
| 21 | errorMessage = 'Generic Error'; | 21 | errorMessage = 'Generic Error'; |
| 22 | - break; | ||
| 23 | } | 22 | } |
| 24 | 23 | ||
| 25 | return ColoredBox( | 24 | return ColoredBox( |
-
Please register or login to post a comment