I have the design(shown in the photo) and I'm using showModalBottomSheet but when I set the width, it doesn't change and stay as screen width, so I have a couple of questions:
1-how to set a width to showModalBottomSheet
2-is there an alternative to showModalBottomSheet for this kind of bottom menu's
3-how to blur the background as it shows in the photo
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return Container(
height: SizeConfig.screenHeight * 0.6,
width: 30,
color: Colors.red,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const Text('Modal BottomSheet'),
ElevatedButton(
child: const Text('Close BottomSheet'),
onPressed: () => Navigator.pop(context),
)
],
),
),
);
},
);
question from:https://stackoverflow.com/questions/65844186/how-to-set-showmodalbottomsheet-width-in-flutter