|
|
@@ -33,17 +33,18 @@ class NotificationSettingDialog extends StatelessWidget { |
|
|
|
await Permission.notification.request(); |
|
|
|
if (await Permission.notification.isDenied) { |
|
|
|
var packageInfo = await PackageInfo.fromPlatform(); |
|
|
|
await showDialog( |
|
|
|
var result = await showDialog( |
|
|
|
context: context, |
|
|
|
child: TipDialog( |
|
|
|
btnText: "去打开", |
|
|
|
content: "系统检查到您还未开启通知权限,可通过以下指引打开通知权限\n 设置 -> 应用管理 -> " + (packageInfo?.appName ?? "") + " -> 通知管理", |
|
|
|
)); |
|
|
|
|
|
|
|
if (Platform.isAndroid) { |
|
|
|
NativeUtil.openAppSettings(); |
|
|
|
} else { |
|
|
|
openAppSettings(); |
|
|
|
if (result != null && result) { |
|
|
|
if (Platform.isAndroid) { |
|
|
|
NativeUtil.openAppSettings(); |
|
|
|
} else { |
|
|
|
openAppSettings(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|