Fix event modal position
This commit is contained in:
parent
1c7f353e5f
commit
373004f52a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue