From 6662d4a48f26fecd1820798d7d45d88a45d43950 Mon Sep 17 00:00:00 2001 From: Kima Date: Sun, 7 Apr 2024 19:18:38 +0200 Subject: [PATCH] bottom sheet fixes --- .../rounded_bottom_sheet.dart | 48 ++++++++++--------- refilc_plus | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart b/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart index 729b93c..cea47f9 100644 --- a/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart +++ b/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart @@ -1,13 +1,15 @@ +import 'package:flutter/widgets.dart'; import 'package:refilc/theme/colors/colors.dart'; import 'package:flutter/material.dart'; class RoundedBottomSheet extends StatelessWidget { - const RoundedBottomSheet( - {super.key, - this.child, - this.borderRadius = 12.0, - this.shrink = true, - this.showHandle = true}); + const RoundedBottomSheet({ + super.key, + this.child, + this.borderRadius = 16.0, + this.shrink = false, + this.showHandle = true, + }); final Widget? child; final double borderRadius; @@ -17,6 +19,7 @@ class RoundedBottomSheet extends StatelessWidget { @override Widget build(BuildContext context) { return AnimatedContainer( + height: 2000, duration: const Duration(milliseconds: 500), decoration: BoxDecoration( color: Theme.of(context).colorScheme.background, @@ -25,24 +28,22 @@ class RoundedBottomSheet extends StatelessWidget { topRight: Radius.circular(borderRadius), ), ), - child: SafeArea( - child: Column( - mainAxisSize: shrink ? MainAxisSize.min : MainAxisSize.max, - children: [ - if (showHandle) - Container( - width: 42.0, - height: 4.0, - margin: const EdgeInsets.only(top: 12.0, bottom: 4.0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(45.0), - color: AppColors.of(context).text.withOpacity(0.10), - ), + child: Column( + mainAxisSize: shrink ? MainAxisSize.min : MainAxisSize.max, + children: [ + if (showHandle) + Container( + width: 42.0, + height: 4.0, + margin: const EdgeInsets.only(top: 12.0, bottom: 4.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(45.0), + color: AppColors.of(context).text.withOpacity(0.10), ), - if (child != null) child!, - SizedBox(height: MediaQuery.of(context).padding.bottom), - ], - ), + ), + if (child != null) child!, + SizedBox(height: MediaQuery.of(context).padding.bottom), + ], ), ); } @@ -55,6 +56,7 @@ Future showRoundedModalBottomSheet( bool showHandle = true, }) async { return await showModalBottomSheet( + useSafeArea: false, context: context, backgroundColor: const Color(0x00000000), elevation: 0, diff --git a/refilc_plus b/refilc_plus index 9ac6e74..fc6bdf7 160000 --- a/refilc_plus +++ b/refilc_plus @@ -1 +1 @@ -Subproject commit 9ac6e74dafd496c2e1efc4c7f2e8e5d42aac7854 +Subproject commit fc6bdf78f192234d3dccd899fd82cab45db3762e