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 {
await showModalBottomSheet(
backgroundColor: Colors.transparent,
isScrollControlled: true,
context: context,
builder: (context) => Container(
padding: const EdgeInsets.all(20),
@ -69,6 +71,7 @@ class ActionSheetUtils {
),
),
),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@ -86,14 +89,15 @@ class ActionSheetUtils {
if (data.titleIcon != null)
Icon(
data.titleIcon,
color:
data.titleColor ?? Theme.of(context).colorScheme.title,
color: data.titleColor ??
Theme.of(context).colorScheme.title,
),
if (data.titleIcon != null) const SizedBox(width: 8),
DidvanText(
data.title,
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 {
],
),
),
),
);
}