Skip to content

Commit

Permalink
Remove inconsistent bottom sheet scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
FauconSpartiate committed Feb 28, 2024
1 parent 265284a commit 7b187b1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/ui/widgets/bottom_sheets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class _EasyBottomSheetState extends State<EasyBottomSheet> {
cardTheme: Theme.of(context).cardTheme.copyWith(elevation: 0.75),
),
child: ListView(
controller: scrollController,
children: children,
),
),
Expand All @@ -118,15 +117,20 @@ class _EasyBottomSheetState extends State<EasyBottomSheet> {
}
}

void showColorBottomSheet(BuildContext context, void Function()? onChanged) => showModalBottomSheet(
isScrollControlled: true,
void showBottomSheet({required BuildContext context, required Widget child}) => showModalBottomSheet(
context: context,
isScrollControlled: true,
showDragHandle: true,
builder: (context) {
return ColorBottomSheet(onChanged: onChanged);
return child;
},
);

void showColorBottomSheet(BuildContext context, void Function()? onChanged) => showBottomSheet(
context: context,
child: ColorBottomSheet(onChanged: onChanged),
);

class ColorBottomSheet extends StatelessWidget {
const ColorBottomSheet({
super.key,
Expand Down Expand Up @@ -234,13 +238,9 @@ class ColorBottomSheet extends StatelessWidget {
}
}

void showSocialsBottomSheet(BuildContext context) => showModalBottomSheet(
isScrollControlled: true,
void showSocialsBottomSheet(BuildContext context) => showBottomSheet(
context: context,
showDragHandle: true,
builder: (context) {
return const SocialsBottomSheet();
},
child: const SocialsBottomSheet(),
);

class SocialsBottomSheet extends StatelessWidget {
Expand Down

0 comments on commit 7b187b1

Please sign in to comment.