showMenu static method
void
showMenu(
- BuildContext context,
- GlobalKey<
State< refer,StatefulWidget> > - Widget child, {
- double offsetHeight = 0,
展示菜单
context 上下文
refer 参照物,用于确定菜单出现的位置的参照物,默认位置为参照物下10dp
child 菜单展示内容view
offsetHeight 高度偏移量(正常贴着按钮的左下角开始绘制弹窗view)
Implementation
static void showMenu(BuildContext context, GlobalKey refer, Widget child,
{double offsetHeight = 0}) {
showDialog(
context: context,
barrierColor: Colors.transparent,
builder: (_) {
return FDialogMenu(
refer: refer,
offsetHeight: offsetHeight,
child: child,
);
},
);
}