Fix event modal position

This commit is contained in:
Michael Thomas 2022-09-03 14:46:24 -04:00
parent 1c7f353e5f
commit 373004f52a
1 changed files with 3 additions and 5 deletions

View File

@ -35,12 +35,12 @@ class _EventModalState extends State<_EventModal> {
void updateMaxHeight() {
if (_parentConstraints != null) {
print(_key.currentContext?.size?.height);
var listHeight = _key.currentContext?.size?.height;
var parentHeight = _parentConstraints?.maxHeight;
if (listHeight != null && parentHeight != null) {
var maxHeight = (listHeight + 50) / parentHeight;
setState(() {
_maxChildHeight = (listHeight + 150) / parentHeight;
_maxChildHeight = (maxHeight < 0.75) ? maxHeight : 0.75;
});
}
}
@ -71,8 +71,6 @@ class _EventModalState extends State<_EventModal> {
builder: (_, controller) {
return Container(
color: Colors.grey.shade100,
margin: const EdgeInsets.only(
bottom: kBottomNavigationBarHeight),
child: Column(
children: [
const Align(
@ -119,7 +117,7 @@ class _EventModalContent extends StatelessWidget {
Widget build(BuildContext context) {
return ListView(
shrinkWrap: true,
padding: const EdgeInsets.symmetric(horizontal: 40),
padding: const EdgeInsets.only(left: 40, right: 40, bottom: 40),
controller: controller,
children: <Widget>[
// Title