Compare commits
No commits in common. "f917b73964184c70f300bdb96c9401ff197e7890" and "78c1fff88bd768bce538d2b996c8ffbd3af51ff1" have entirely different histories.
f917b73964
...
78c1fff88b
|
|
@ -54,9 +54,5 @@
|
||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
|
||||||
<string>为了更好的服务需要开启储存权限,用于保存批阅图</string>
|
|
||||||
<key>NSFileProviderDomain</key>
|
|
||||||
<string>为了更好的服务需要开启储存权限,用于保存批阅图</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
|
||||||
void getStoragePermission() async {
|
void getStoragePermission() async {
|
||||||
_timerPermission?.cancel();
|
_timerPermission?.cancel();
|
||||||
_timerPermission = null;
|
_timerPermission = null;
|
||||||
var status = await Permission.storage.request();
|
var status = await Permission.storage.status;
|
||||||
if (status != PermissionStatus.granted) {
|
if (status != PermissionStatus.granted) {
|
||||||
print(status);
|
print(status);
|
||||||
if (status == PermissionStatus.denied) {
|
if (status == PermissionStatus.denied) {
|
||||||
|
|
@ -49,8 +49,8 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: const Text("储存权限拒绝"),
|
title: Text("权限拒绝"),
|
||||||
content: const Text("为了提供更好的服务,需要获取到存储权限用于保存批阅笔记"),
|
content: Text("权限被永久拒绝,请前往权限设置页面通过权限"),
|
||||||
actions: [
|
actions: [
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
|
@ -58,7 +58,7 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
_timerPermission = Timer.periodic(const Duration(seconds: 30), (_) => getStoragePermission());
|
_timerPermission = Timer.periodic(const Duration(seconds: 30), (_) => getStoragePermission());
|
||||||
},
|
},
|
||||||
child: const Text('前往APP权限设置'),
|
child: Text('前往'),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue