As of May 1st 2019, use ***BottomSheetTheme***.
MaterialApp(
theme: ThemeData(
// Draw all modals with a white background and top rounded corners
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(10))
)
)
),
[Introduced][1] recently, using a theme to control the sheets style should be the best route.
If you want to theme different bottom sheets differently, include a new Theme object in the appropriate subtree to override the bottom sheet theme just for that area.
If for some reason you'd still like to override the theme manually when launching a bottom sheet, **showBottomSheet** and **showModalBottomSheet** now have a **backgroundColor** parameter. Use it like this:
showModalBottomSheet(
backgroundColor: Colors.transparent,
context: context,
builder: © {return NavSheet();},
);
[1]:
[To see links please register here]