Added imprint and privacy information for marianum and webuntis
This commit is contained in:
23
lib/widget/quickMenu.dart
Normal file
23
lib/widget/quickMenu.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class QuickMenu {
|
||||
static void quickMenu(BuildContext context, BuildContext widgetContext, List<PopupMenuItem<dynamic>> items) {
|
||||
final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
|
||||
|
||||
final RenderBox widgetRenderBox = widgetContext.findRenderObject() as RenderBox;
|
||||
final Offset position = widgetRenderBox.localToGlobal(Offset.zero);
|
||||
|
||||
showMenu(
|
||||
context: context,
|
||||
position: RelativeRect.fromRect(
|
||||
Rect.fromPoints(
|
||||
position,
|
||||
position.translate(0, 0),
|
||||
),
|
||||
Offset.zero & overlay.size,
|
||||
),
|
||||
items: items,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user