bottom sheet fixes

This commit is contained in:
Kima
2024-04-07 19:18:38 +02:00
parent 05f4215faf
commit 6662d4a48f
2 changed files with 26 additions and 24 deletions

View File

@@ -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,
const RoundedBottomSheet({
super.key,
this.child,
this.borderRadius = 12.0,
this.shrink = true,
this.showHandle = true});
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,7 +28,6 @@ class RoundedBottomSheet extends StatelessWidget {
topRight: Radius.circular(borderRadius),
),
),
child: SafeArea(
child: Column(
mainAxisSize: shrink ? MainAxisSize.min : MainAxisSize.max,
children: [
@@ -43,7 +45,6 @@ class RoundedBottomSheet extends StatelessWidget {
SizedBox(height: MediaQuery.of(context).padding.bottom),
],
),
),
);
}
}
@@ -55,6 +56,7 @@ Future<T?> showRoundedModalBottomSheet<T>(
bool showHandle = true,
}) async {
return await showModalBottomSheet<T>(
useSafeArea: false,
context: context,
backgroundColor: const Color(0x00000000),
elevation: 0,