showDebugBtn function
dynamic
showDebugBtn(
- BuildContext context, {
- Widget? button,
- Color? btnColor,
- required double btnSize,
显示全局悬浮调试按钮
Implementation
showDebugBtn(BuildContext context, {Widget? button, Color? btnColor, required double btnSize}) async {
///widget第一次渲染完成
try {
await Future.delayed(Duration(milliseconds: 500));
dismissDebugBtn();
itemEntry = OverlayEntry(
builder: (BuildContext context) =>
button ??
DraggableButtonWidget(
btnColor: btnColor,
btnSize: btnSize,
));
///显示悬浮menu
Overlay.of(context).insert(itemEntry!);
} catch (e) {}
}