From bb1c1054613c33d31288bfa63abee0a07a0b2880 Mon Sep 17 00:00:00 2001 From: Edouard Marquez Date: Fri, 25 Oct 2024 19:24:55 +0200 Subject: [PATCH] Onboarding first screen: add a slight padding for devices without a transparent nav bar (#5705) Co-authored-by: Pierre Slamich --- packages/smooth_app/ios/Podfile.lock | 17 +++++++++-------- .../onboarding/v2/onboarding_bottom_hills.dart | 8 +++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/smooth_app/ios/Podfile.lock b/packages/smooth_app/ios/Podfile.lock index c2373332d6c..657bc696e02 100644 --- a/packages/smooth_app/ios/Podfile.lock +++ b/packages/smooth_app/ios/Podfile.lock @@ -140,13 +140,14 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - sqflite (0.0.3): + - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS - url_launcher_ios (0.0.1): - Flutter - webview_flutter_wkwebview (0.0.1): - Flutter + - FlutterMacOS DEPENDENCIES: - app_settings (from `.symlinks/plugins/app_settings/ios`) @@ -174,9 +175,9 @@ DEPENDENCIES: - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite (from `.symlinks/plugins/sqflite/darwin`) + - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`) SPEC REPOS: trunk: @@ -251,12 +252,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - sqflite: - :path: ".symlinks/plugins/sqflite/darwin" + sqflite_darwin: + :path: ".symlinks/plugins/sqflite_darwin/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" webview_flutter_wkwebview: - :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" + :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" SPEC CHECKSUMS: app_settings: 017320c6a680cdc94c799949d95b84cb69389ebc @@ -303,9 +304,9 @@ SPEC CHECKSUMS: sentry_flutter: 0eb93e5279eb41e2392212afe1ccd2fecb4f8cbe share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe - webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1 + webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4 PODFILE CHECKSUM: e840dd57ba2b03bcb6fdba293a27c5f82151a80a diff --git a/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart b/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart index e8ecaa7c70b..1e4b1eed85d 100644 --- a/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart +++ b/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart @@ -24,7 +24,13 @@ class OnboardingBottomHills extends StatelessWidget { @override Widget build(BuildContext context) { final TextDirection textDirection = Directionality.of(context); - final double bottomPadding = MediaQuery.viewPaddingOf(context).bottom; + double bottomPadding = MediaQuery.viewPaddingOf(context).bottom; + if (bottomPadding == 0) { + // Add a slight padding for devices without a transparent nav bar + // (eg: iPhone SE) + bottomPadding = 4.0; + } + final double maxHeight = OnboardingBottomHills.height(context); final SmoothColorsThemeExtension colors = Theme.of(context).extension()!;