fix peer view menu position
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
parent
c522987b6f
commit
55f3b93958
@ -763,6 +763,8 @@ class PeerViewDropdown extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _PeerViewDropdownState extends State<PeerViewDropdown> {
|
class _PeerViewDropdownState extends State<PeerViewDropdown> {
|
||||||
|
RelativeRect menuPos = RelativeRect.fromLTRB(0, 0, 0, 0);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final List<PeerUiType> types = [PeerUiType.grid, PeerUiType.tile, PeerUiType.list];
|
final List<PeerUiType> types = [PeerUiType.grid, PeerUiType.tile, PeerUiType.list];
|
||||||
@ -802,7 +804,6 @@ class _PeerViewDropdownState extends State<PeerViewDropdown> {
|
|||||||
))));
|
))));
|
||||||
}
|
}
|
||||||
|
|
||||||
var menuPos = RelativeRect.fromLTRB(0, 0, 0, 0);
|
|
||||||
return _hoverAction(
|
return _hoverAction(
|
||||||
context: context,
|
context: context,
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
@ -818,7 +819,9 @@ class _PeerViewDropdownState extends State<PeerViewDropdown> {
|
|||||||
onTapDown: (details) {
|
onTapDown: (details) {
|
||||||
final x = details.globalPosition.dx;
|
final x = details.globalPosition.dx;
|
||||||
final y = details.globalPosition.dy;
|
final y = details.globalPosition.dy;
|
||||||
|
setState(() {
|
||||||
menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onTap: () => showMenu(
|
onTap: () => showMenu(
|
||||||
context: context,
|
context: context,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user