feat: compose Android app and verify native calendar and reminders
This commit is contained in:
@@ -34,6 +34,16 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
}
|
||||
|
||||
Future<void> _calendar(bool enabled) async {
|
||||
try {
|
||||
await _calendarAction(enabled);
|
||||
} catch (_) {
|
||||
if (mounted) {
|
||||
_notice('日历暂时不可用,请检查权限后重试');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _calendarAction(bool enabled) async {
|
||||
final c = widget.controller;
|
||||
if (enabled) {
|
||||
if (!await c.calendar.requestAccess()) {
|
||||
|
||||
Reference in New Issue
Block a user