Skip to content

Commit

Permalink
fix: Scanner preview over other widgets fix (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
M123-dev authored Jan 13, 2022
1 parent f55054c commit c5ea875
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
10 changes: 5 additions & 5 deletions packages/smooth_app/lib/pages/scan/continuous_scan_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ class _ContinuousScanPageState extends State<ContinuousScanPage> {
appBar: AppBar(toolbarHeight: 0.0),
body: Stack(
children: <Widget>[
...getScannerWidgets(
context,
constraints,
_model,
),
SmoothRevealAnimation(
delay: 400,
startOffset: Offset.zero,
Expand All @@ -59,6 +54,11 @@ class _ContinuousScanPageState extends State<ContinuousScanPage> {
onQRViewCreated: setupScanner,
),
),
...getScannerWidgets(
context,
constraints,
_model,
),
],
),
);
Expand Down
10 changes: 5 additions & 5 deletions packages/smooth_app/lib/pages/scan/ml_kit_scan_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ class MLKitScannerPageState extends State<MLKitScannerPage> {
return Stack(
fit: StackFit.expand,
children: <Widget>[
...getScannerWidgets(
context,
constraints,
_model,
),
SmoothRevealAnimation(
delay: 400,
startOffset: Offset.zero,
Expand All @@ -123,6 +118,11 @@ class MLKitScannerPageState extends State<MLKitScannerPage> {
),
),
),
...getScannerWidgets(
context,
constraints,
_model,
),
],
);
},
Expand Down
25 changes: 23 additions & 2 deletions packages/smooth_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
device_frame:
dependency: transitive
description:
name: device_frame
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
device_preview:
dependency: "direct main"
description:
name: device_preview
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -329,6 +343,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4"
freezed_annotation:
dependency: transitive
description:
name: freezed_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
fwfh_text_style:
dependency: transitive
description:
Expand Down Expand Up @@ -1049,5 +1070,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
dart: ">=2.15.1 <3.0.0"
flutter: ">=2.6.0-0"

0 comments on commit c5ea875

Please sign in to comment.