D
NavigationBeginner10 XP2 min read

When do you use a modal bottom sheet vs a dialog in Flutter?

TL;DR: Dialogs interrupt the user with important decisions or alerts. Bottom sheets show contextual actions or additional content in a mobile-friendly, swipeable panel from the bottom.

Full Answer

AspectDialogModal Bottom Sheet
PositionCenter of screenSlides up from bottom
Use caseConfirmations, alerts, critical actionsOptions, filters, content pickers
DismissalTap outside or buttonSwipe down, drag, or tap outside
Content heightFixed dialog sizeFlexible โ€” can be full screen
Material specAlertDialog, SimpleDialogshowModalBottomSheet, DraggableScrollableSheet
๐ŸŽฏ

For complex bottom sheets (tabs, scroll), use DraggableScrollableSheet inside showModalBottomSheet for a collapsible, scrollable pattern.

Code Examples

dartshowModalBottomSheet usage
Output
Rounded bottom sheet slides up with Share/Edit/Delete options; draggable to full screen

Common Mistakes

  • โœ—Using AlertDialog for content-heavy actions โ€” use bottom sheet for better mobile UX
  • โœ—Not passing isScrollControlled: true for tall content โ€” bottom sheet caps at 50% screen height by default

Interview Tip

๐Ÿ’ก

Mentioning the isScrollControlled and DraggableScrollableSheet combo shows you build production-quality UIs, not just basic examples.

#bottom-sheet#dialog#showModalBottomSheet#showDialog#UX