showToastMessage static method
dynamic
showToastMessage(})
因百度键盘导致Fluttertoast库toast无法弹出,故使用Toast
Implementation
static showToastMessage(
String message, {
int? gravity = old.Toast.center,
int? duration,
bool needForceShow = false, //是否要在游戏中展示
}) {
///游戏中,不显示APP内的toast,除非该路由本身调用
if (needForceShow == false) {
if (OverlayInit.shouldGiveupToastCheck != null) {
bool shouldGiveup = OverlayInit.shouldGiveupToastCheck!();
if (shouldGiveup == true) {
return;
}
}
}
old.Toast.show(
message,
gravity: gravity,
duration: duration,
);
}