|
|
|
@ -66,6 +66,17 @@ class PermissionsView extends GetView<SettingsController> { |
|
|
|
isDarkMode), |
|
|
|
SizedBox(height: 20.h), |
|
|
|
], |
|
|
|
// 闹钟权限组 |
|
|
|
if (Platform.isAndroid) ...[ |
|
|
|
_buildPermissionSection( |
|
|
|
'alarmPermissions'.tr, // 闹钟权限 |
|
|
|
Icons.alarm, |
|
|
|
[Permission.scheduleExactAlarm], |
|
|
|
permissionStatuses, |
|
|
|
isDarkMode, |
|
|
|
), |
|
|
|
SizedBox(height: 20.h), |
|
|
|
], |
|
|
|
|
|
|
|
// 日历权限组 |
|
|
|
_buildPermissionSection( |
|
|
|
@ -165,6 +176,8 @@ class PermissionsView extends GetView<SettingsController> { |
|
|
|
return 'calendarFullAccess'.tr; // 日历完整访问 |
|
|
|
case Permission.location: |
|
|
|
return 'locationInfo'.tr; // 位置信息 |
|
|
|
case Permission.scheduleExactAlarm: |
|
|
|
return 'alarm'.tr; // 闹钟 |
|
|
|
default: |
|
|
|
return permission.toString(); |
|
|
|
} |
|
|
|
@ -183,6 +196,8 @@ class PermissionsView extends GetView<SettingsController> { |
|
|
|
return 'calendarFullAccessPermissionDesc'.tr; // 用于读取和管理日历事件及提醒 |
|
|
|
case Permission.location: |
|
|
|
return 'locationPermissionDesc'.tr; // 用于获取当前位置信息 |
|
|
|
case Permission.scheduleExactAlarm: |
|
|
|
return 'alarmPermissionDesc'.tr; // 设置精确闹钟需要此权限 |
|
|
|
default: |
|
|
|
return 'appFunctionNeeds'.tr; // 应用功能需要 |
|
|
|
} |
|
|
|
@ -358,6 +373,8 @@ class PermissionsView extends GetView<SettingsController> { |
|
|
|
return 'calendarFullAccess'.tr; // 日历完整访问 |
|
|
|
case Permission.location: |
|
|
|
return 'locationInfo'.tr; // 位置信息 |
|
|
|
case Permission.scheduleExactAlarm: |
|
|
|
return 'alarm'.tr; // 闹钟 |
|
|
|
default: |
|
|
|
return permission.toString(); |
|
|
|
} |
|
|
|
@ -376,6 +393,8 @@ class PermissionsView extends GetView<SettingsController> { |
|
|
|
return 'calendarFullAccessPermissionDetailDesc'.tr; // 管理日历事件需要完整日历权限 |
|
|
|
case Permission.location: |
|
|
|
return 'locationPermissionDetailDesc'.tr; // 获取位置信息需要位置权限 |
|
|
|
case Permission.scheduleExactAlarm: |
|
|
|
return 'alarmPermissionDetailDesc'.tr; // 设置精确闹钟需要此权限 |
|
|
|
default: |
|
|
|
return 'appNeedsPermissionForFullFunction'.tr; // 应用需要此权限以提供完整功能 |
|
|
|
} |
|
|
|
|