You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can create events on debug mode and it works very well but once the apk is published, the plugin does not work as expected.
Steps to reproduce:
In the build mode, execute the code to create a basic event
flutter clean
flutter build apk
install the apk on a real mobile device
execute the same event creation code
`void _createEvent() async {
final calendar = DeviceCalendarPlugin();
if (!(await calendar.hasPermissions()).data) {
var result = await calendar.requestPermissions();
if (!result.data) {
return;
}
}
var availableCalendars = await calendar.retrieveCalendars();
if (availableCalendars.data.isEmpty) {
return;
}
var defaultCalendarId = availableCalendars.data.first.id;
final event = Event(defaultCalendarId,
title: 'Sajad has created an event',
allDay: false,
start: DateTime.now(),
end: DateTime.now().add(Duration(days: 2)));
event.reminders = [];
event.reminders.add(Reminder(minutes: 10));
var addedEvent = await calendar.createOrUpdateEvent(event);
if (addedEvent.isSuccess) {
key.currentState.showSnackBar(SnackBar(content: Text('Success')));
} else {
key.currentState.showSnackBar(
SnackBar(content: Text(addedEvent.errorMessages.first)));
}
}`
This is the error that I get: [400] To create or update an event you must provide calendar ID, event with a title and event's start date and end date (where start date must be before end date)
my flutter doctor results:
`
[√] Flutter (Channel stable, v1.12.13+hotfix.7, on Microsoft Windows [Version 10.0.18362.657], locale en-US)
• Flutter version 1.12.13+hotfix.7 at C:\src\flutter
• Framework revision 9f5ff2306b (3 weeks ago), 2020-01-26 22:38:26 -0800
• Engine revision a67792536c
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\Lenovo\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.42.1)
• VS Code at C:\Users\Lenovo\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
`
Any idea?
Thanks
The text was updated successfully, but these errors were encountered:
Hi all,
I can create events on debug mode and it works very well but once the apk is published, the plugin does not work as expected.
Steps to reproduce:
flutter clean
flutter build apk
`void _createEvent() async {
final calendar = DeviceCalendarPlugin();
}`
This is the error that I get:
[400] To create or update an event you must provide calendar ID, event with a title and event's start date and end date (where start date must be before end date)
my flutter doctor results:
`
[√] Flutter (Channel stable, v1.12.13+hotfix.7, on Microsoft Windows [Version 10.0.18362.657], locale en-US)
• Flutter version 1.12.13+hotfix.7 at C:\src\flutter
• Framework revision 9f5ff2306b (3 weeks ago), 2020-01-26 22:38:26 -0800
• Engine revision a67792536c
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\Lenovo\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.42.1)
• VS Code at C:\Users\Lenovo\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
`
Any idea?
Thanks
The text was updated successfully, but these errors were encountered: