Just noticed that the top SafeArea is being ignored when showModalBottomSheet is set to isScrollControlled: true.(I want my modal to fit the screen) Anyone found a way to fix it?
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (context) => MyModal(),
)
My test modal
class MyModal extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Column(
children: <Widget>[
Text('Modal'),
Expanded(
child: Container(
color: Colors.red,
))
],
),
);
}
}
OUTPUT
I kinda temporary fixed it by setting height of modal content
SafeArea(
child: Container(
height: MediaQuery.of(context).size.height - 80,
child: Column(
children: ...
OUTPUT

