From 373004f52a2b7e71786360314ea5a20b8860274d Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sat, 3 Sep 2022 14:46:24 -0400 Subject: [PATCH] Fix event modal position --- lib/src/widgets/events/event_modal.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/src/widgets/events/event_modal.dart b/lib/src/widgets/events/event_modal.dart index aea94d8..1ed220e 100644 --- a/lib/src/widgets/events/event_modal.dart +++ b/lib/src/widgets/events/event_modal.dart @@ -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: [ // Title