resolved pr comments
This commit is contained in:
7
lib/widget/focusBehaviour.dart
Normal file
7
lib/widget/focusBehaviour.dart
Normal file
@ -0,0 +1,7 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class FocusBehaviour {
|
||||
static void textFieldTapOutside(BuildContext context) {
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
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