Commit 8176659cda32444617ed7771f7702ffd6b469d73

Authored by wdn127929
1 parent b6a5186e

修复权限使用目的提醒bug:用户自主按返回键遮罩层消失,定时器还会执行返回上一层页面,当用户在home页,即栈顶层,则会出现黑屏

Showing 1 changed file with 12 additions and 7 deletions
import 'dart:async';
import 'dart:convert';
import 'dart:ui';
... ... @@ -59,16 +60,16 @@ typedef ClickCallback = void Function(String value);
// };
class DialogUtil {
static showAuthorityDestination(
BuildContext context, String name, String title, String subTitle) {
Future.delayed(const Duration(seconds: 5), () {
static showAuthorityDestination(
BuildContext context, String name, String title, String subTitle) async {
Timer _timer = Timer(const Duration(seconds: 5), () {
Navigator.of(context).pop(true);
});
return showDialog(
final action = await showDialog(
context: context,
barrierDismissible: true,
anchorPoint:Offset(0,0),
anchorPoint: Offset(0, 0),
builder: (BuildContext context) {
return StatefulBuilder(builder: (context, state) {
// locationState = state;
... ... @@ -114,9 +115,13 @@ class DialogUtil {
});
});
;
print(action);
_timer.cancel();
return action;
}
//模块快过期提醒
static showSellerVersionEdateDialog(BuildContext context,
List<SellerVersionSunModel> showData, CustomCallBack callback,
... ...