Committed by
GitHub
Merge branch 'master' into pavel/web-auto
Showing
11 changed files
with
42 additions
and
30 deletions
| @@ -11,7 +11,7 @@ jobs: | @@ -11,7 +11,7 @@ jobs: | ||
| 11 | analysis: | 11 | analysis: |
| 12 | runs-on: ubuntu-latest | 12 | runs-on: ubuntu-latest |
| 13 | steps: | 13 | steps: |
| 14 | - - uses: actions/checkout@v3.2.0 | 14 | + - uses: actions/checkout@v3.3.0 |
| 15 | - uses: actions/setup-java@v3.9.0 | 15 | - uses: actions/setup-java@v3.9.0 |
| 16 | with: | 16 | with: |
| 17 | java-version: 11 | 17 | java-version: 11 |
| @@ -28,7 +28,7 @@ jobs: | @@ -28,7 +28,7 @@ jobs: | ||
| 28 | formatting: | 28 | formatting: |
| 29 | runs-on: ubuntu-latest | 29 | runs-on: ubuntu-latest |
| 30 | steps: | 30 | steps: |
| 31 | - - uses: actions/checkout@v3.2.0 | 31 | + - uses: actions/checkout@v3.3.0 |
| 32 | - uses: actions/setup-java@v3.9.0 | 32 | - uses: actions/setup-java@v3.9.0 |
| 33 | with: | 33 | with: |
| 34 | java-version: 11 | 34 | java-version: 11 |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | release-please: | 7 | release-please: |
| 8 | runs-on: ubuntu-latest | 8 | runs-on: ubuntu-latest |
| 9 | steps: | 9 | steps: |
| 10 | - - uses: GoogleCloudPlatform/release-please-action@v3.7.1 | 10 | + - uses: GoogleCloudPlatform/release-please-action@v3.7.3 |
| 11 | with: | 11 | with: |
| 12 | token: ${{ secrets.GITHUB_TOKEN }} | 12 | token: ${{ secrets.GITHUB_TOKEN }} |
| 13 | release-type: simple | 13 | release-type: simple |
| @@ -9,7 +9,7 @@ buildscript { | @@ -9,7 +9,7 @@ buildscript { | ||
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | dependencies { | 11 | dependencies { |
| 12 | - classpath 'com.android.tools.build:gradle:7.3.1' | 12 | + classpath 'com.android.tools.build:gradle:7.4.0' |
| 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
| 14 | } | 14 | } |
| 15 | } | 15 | } |
| @@ -6,7 +6,7 @@ buildscript { | @@ -6,7 +6,7 @@ buildscript { | ||
| 6 | } | 6 | } |
| 7 | 7 | ||
| 8 | dependencies { | 8 | dependencies { |
| 9 | - classpath 'com.android.tools.build:gradle:7.3.1' | 9 | + classpath 'com.android.tools.build:gradle:7.4.0' |
| 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
| 11 | } | 11 | } |
| 12 | } | 12 | } |
| @@ -28,19 +28,23 @@ class _BarcodeListScannerWithControllerState | @@ -28,19 +28,23 @@ class _BarcodeListScannerWithControllerState | ||
| 28 | bool isStarted = true; | 28 | bool isStarted = true; |
| 29 | 29 | ||
| 30 | void _startOrStop() { | 30 | void _startOrStop() { |
| 31 | + try { | ||
| 31 | if (isStarted) { | 32 | if (isStarted) { |
| 32 | controller.stop(); | 33 | controller.stop(); |
| 33 | } else { | 34 | } else { |
| 34 | - controller.start().catchError((error) { | ||
| 35 | - if (mounted) { | ||
| 36 | - setState(() {}); | 35 | + controller.start(); |
| 37 | } | 36 | } |
| 38 | - }); | ||
| 39 | - } | ||
| 40 | - | ||
| 41 | setState(() { | 37 | setState(() { |
| 42 | isStarted = !isStarted; | 38 | isStarted = !isStarted; |
| 43 | }); | 39 | }); |
| 40 | + } on Exception catch (e) { | ||
| 41 | + ScaffoldMessenger.of(context).showSnackBar( | ||
| 42 | + SnackBar( | ||
| 43 | + content: Text('Something went wrong! $e'), | ||
| 44 | + backgroundColor: Colors.red, | ||
| 45 | + ), | ||
| 46 | + ); | ||
| 47 | + } | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | @override | 50 | @override |
| @@ -121,7 +125,7 @@ class _BarcodeListScannerWithControllerState | @@ -121,7 +125,7 @@ class _BarcodeListScannerWithControllerState | ||
| 121 | overflow: TextOverflow.fade, | 125 | overflow: TextOverflow.fade, |
| 122 | style: Theme.of(context) | 126 | style: Theme.of(context) |
| 123 | .textTheme | 127 | .textTheme |
| 124 | - .headline4! | 128 | + .headlineMedium! |
| 125 | .copyWith(color: Colors.white), | 129 | .copyWith(color: Colors.white), |
| 126 | ), | 130 | ), |
| 127 | ), | 131 | ), |
| @@ -28,19 +28,23 @@ class _BarcodeScannerWithControllerState | @@ -28,19 +28,23 @@ class _BarcodeScannerWithControllerState | ||
| 28 | bool isStarted = true; | 28 | bool isStarted = true; |
| 29 | 29 | ||
| 30 | void _startOrStop() { | 30 | void _startOrStop() { |
| 31 | + try { | ||
| 31 | if (isStarted) { | 32 | if (isStarted) { |
| 32 | controller.stop(); | 33 | controller.stop(); |
| 33 | } else { | 34 | } else { |
| 34 | - controller.start().catchError((error) { | ||
| 35 | - if (mounted) { | ||
| 36 | - setState(() {}); | 35 | + controller.start(); |
| 37 | } | 36 | } |
| 38 | - }); | ||
| 39 | - } | ||
| 40 | - | ||
| 41 | setState(() { | 37 | setState(() { |
| 42 | isStarted = !isStarted; | 38 | isStarted = !isStarted; |
| 43 | }); | 39 | }); |
| 40 | + } on Exception catch (e) { | ||
| 41 | + ScaffoldMessenger.of(context).showSnackBar( | ||
| 42 | + SnackBar( | ||
| 43 | + content: Text('Something went wrong! $e'), | ||
| 44 | + backgroundColor: Colors.red, | ||
| 45 | + ), | ||
| 46 | + ); | ||
| 47 | + } | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | @override | 50 | @override |
| @@ -127,7 +131,7 @@ class _BarcodeScannerWithControllerState | @@ -127,7 +131,7 @@ class _BarcodeScannerWithControllerState | ||
| 127 | overflow: TextOverflow.fade, | 131 | overflow: TextOverflow.fade, |
| 128 | style: Theme.of(context) | 132 | style: Theme.of(context) |
| 129 | .textTheme | 133 | .textTheme |
| 130 | - .headline4! | 134 | + .headlineMedium! |
| 131 | .copyWith(color: Colors.white), | 135 | .copyWith(color: Colors.white), |
| 132 | ), | 136 | ), |
| 133 | ), | 137 | ), |
| @@ -30,19 +30,23 @@ class _BarcodeScannerReturningImageState | @@ -30,19 +30,23 @@ class _BarcodeScannerReturningImageState | ||
| 30 | bool isStarted = true; | 30 | bool isStarted = true; |
| 31 | 31 | ||
| 32 | void _startOrStop() { | 32 | void _startOrStop() { |
| 33 | + try { | ||
| 33 | if (isStarted) { | 34 | if (isStarted) { |
| 34 | controller.stop(); | 35 | controller.stop(); |
| 35 | } else { | 36 | } else { |
| 36 | - controller.start().catchError((error) { | ||
| 37 | - if (mounted) { | ||
| 38 | - setState(() {}); | 37 | + controller.start(); |
| 39 | } | 38 | } |
| 40 | - }); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | setState(() { | 39 | setState(() { |
| 44 | isStarted = !isStarted; | 40 | isStarted = !isStarted; |
| 45 | }); | 41 | }); |
| 42 | + } on Exception catch (e) { | ||
| 43 | + ScaffoldMessenger.of(context).showSnackBar( | ||
| 44 | + SnackBar( | ||
| 45 | + content: Text('Something went wrong! $e'), | ||
| 46 | + backgroundColor: Colors.red, | ||
| 47 | + ), | ||
| 48 | + ); | ||
| 49 | + } | ||
| 46 | } | 50 | } |
| 47 | 51 | ||
| 48 | @override | 52 | @override |
| @@ -141,7 +145,7 @@ class _BarcodeScannerReturningImageState | @@ -141,7 +145,7 @@ class _BarcodeScannerReturningImageState | ||
| 141 | overflow: TextOverflow.fade, | 145 | overflow: TextOverflow.fade, |
| 142 | style: Theme.of(context) | 146 | style: Theme.of(context) |
| 143 | .textTheme | 147 | .textTheme |
| 144 | - .headline4! | 148 | + .headlineMedium! |
| 145 | .copyWith(color: Colors.white), | 149 | .copyWith(color: Colors.white), |
| 146 | ), | 150 | ), |
| 147 | ), | 151 | ), |
| @@ -82,7 +82,7 @@ class _BarcodeScannerWithScanWindowState | @@ -82,7 +82,7 @@ class _BarcodeScannerWithScanWindowState | ||
| 82 | overflow: TextOverflow.fade, | 82 | overflow: TextOverflow.fade, |
| 83 | style: Theme.of(context) | 83 | style: Theme.of(context) |
| 84 | .textTheme | 84 | .textTheme |
| 85 | - .headline4! | 85 | + .headlineMedium! |
| 86 | .copyWith(color: Colors.white), | 86 | .copyWith(color: Colors.white), |
| 87 | ), | 87 | ), |
| 88 | ), | 88 | ), |
| @@ -54,7 +54,7 @@ class _BarcodeScannerWithoutControllerState | @@ -54,7 +54,7 @@ class _BarcodeScannerWithoutControllerState | ||
| 54 | overflow: TextOverflow.fade, | 54 | overflow: TextOverflow.fade, |
| 55 | style: Theme.of(context) | 55 | style: Theme.of(context) |
| 56 | .textTheme | 56 | .textTheme |
| 57 | - .headline4! | 57 | + .headlineMedium! |
| 58 | .copyWith(color: Colors.white), | 58 | .copyWith(color: Colors.white), |
| 59 | ), | 59 | ), |
| 60 | ), | 60 | ), |
| @@ -109,7 +109,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> | @@ -109,7 +109,7 @@ class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> | ||
| 109 | overflow: TextOverflow.fade, | 109 | overflow: TextOverflow.fade, |
| 110 | style: Theme.of(context) | 110 | style: Theme.of(context) |
| 111 | .textTheme | 111 | .textTheme |
| 112 | - .headline4! | 112 | + .headlineMedium! |
| 113 | .copyWith(color: Colors.white), | 113 | .copyWith(color: Colors.white), |
| 114 | ), | 114 | ), |
| 115 | ), | 115 | ), |
-
Please register or login to post a comment