D1APP-16 bottom sheet size configured

This commit is contained in:
MohammadTaha Basiri 2022-01-05 19:41:17 +03:30
parent 1c0faf0db5
commit df40160c55
1 changed files with 49 additions and 44 deletions

View File

@ -58,6 +58,8 @@ class ActionSheetUtils {
static Future<void> showBottomSheet({required ActionSheetData data}) async { static Future<void> showBottomSheet({required ActionSheetData data}) async {
await showModalBottomSheet( await showModalBottomSheet(
backgroundColor: Colors.transparent,
isScrollControlled: true,
context: context, context: context,
builder: (context) => Container( builder: (context) => Container(
padding: const EdgeInsets.all(20), padding: const EdgeInsets.all(20),
@ -69,6 +71,7 @@ class ActionSheetUtils {
), ),
), ),
), ),
child: SingleChildScrollView(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -86,14 +89,15 @@ class ActionSheetUtils {
if (data.titleIcon != null) if (data.titleIcon != null)
Icon( Icon(
data.titleIcon, data.titleIcon,
color: color: data.titleColor ??
data.titleColor ?? Theme.of(context).colorScheme.title, Theme.of(context).colorScheme.title,
), ),
if (data.titleIcon != null) const SizedBox(width: 8), if (data.titleIcon != null) const SizedBox(width: 8),
DidvanText( DidvanText(
data.title, data.title,
style: Theme.of(context).textTheme.subtitle1, style: Theme.of(context).textTheme.subtitle1,
color: data.titleColor ?? Theme.of(context).colorScheme.title, color:
data.titleColor ?? Theme.of(context).colorScheme.title,
) )
], ],
), ),
@ -122,6 +126,7 @@ class ActionSheetUtils {
], ],
), ),
), ),
),
); );
} }