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