Commit 1e84eaed484439dc4f52f9cf5a9a3da3d215f866

Authored by wdn127929
1 parent b40782f2

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

Showing 1 changed file with 11 additions and 6 deletions
import 'dart:async';
import 'dart:convert';
import 'dart:ui';
... ... @@ -60,15 +61,15 @@ typedef ClickCallback = void Function(String value);
class DialogUtil {
static showAuthorityDestination(
BuildContext context, String name, String title, String subTitle) {
Future.delayed(const Duration(seconds: 5), () {
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,
... ...