Skip to content

Commit

Permalink
Fixed the drop down menu not showing fully when the width of the drop…
Browse files Browse the repository at this point in the history
… down menu is smaller than the width of the screen
  • Loading branch information
GanZhiXiong committed Apr 7, 2021
1 parent e6636db commit 7fcba83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/gzx_dropdown_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class _GZXDropDownMenuState extends State<GZXDropDownMenu>
widget.controller.hide();
},
child: Container(
width: MediaQuery.of(context).size.width,
width: double.infinity,
height: MediaQuery.of(context).size.height,
color: widget.maskColor.withOpacity(_maskColorOpacity),
// color: widget.maskColor,
Expand All @@ -192,14 +192,14 @@ class _GZXDropDownMenuState extends State<GZXDropDownMenu>
}

return Positioned(
width: MediaQuery.of(context).size.width,
top: widget.controller.dropDownMenuTop,
left: 0,
right: 0,
child: Column(
children: <Widget>[
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
width: double.infinity,
height: _animation == null ? 0 : _animation!.value,
child: widget.menus[menuIndex].dropDownWidget,
),
Expand Down

0 comments on commit 7fcba83

Please sign in to comment.