Skip to content

Commit

Permalink
fix: pop sheet list not scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Jun 17, 2023
1 parent 0cedc7a commit cca5625
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions lib/components/shared/adaptive/adaptive_pop_sheet_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,40 +74,38 @@ class AdaptivePopSheetList<T> extends StatelessWidget {
showModalBottomSheet(
context: context,
useRootNavigator: useRootNavigator,
isScrollControlled: true,
showDragHandle: true,
constraints: BoxConstraints(
maxHeight: mediaQuery.size.height * 0.6,
),
builder: (context) {
return Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0).copyWith(top: 0),
child: DefaultTextStyle(
style: theme.textTheme.titleMedium!,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (headings != null) ...[
Container(
width: 180,
height: 6,
decoration: BoxDecoration(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (headings != null) ...[
...headings!,
const SizedBox(height: 8),
Divider(
color: theme.colorScheme.primary,
borderRadius: BorderRadius.circular(999),
thickness: 0.3,
endIndent: 16,
indent: 16,
),
],
...children.map(
(item) => _AdaptivePopSheetListItem(
item: item,
onSelected: onSelected,
),
),
const SizedBox(height: 8),
...headings!,
const SizedBox(height: 8),
Divider(
color: theme.colorScheme.primary,
thickness: 0.3,
endIndent: 16,
indent: 16,
),
)
],
...children.map(
(item) => _AdaptivePopSheetListItem(
item: item,
onSelected: onSelected,
),
)
],
),
),
),
);
Expand Down

0 comments on commit cca5625

Please sign in to comment.