Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when creating event with RecurrenceRule(null) #542

Open
Jonny5-5 opened this issue Jun 7, 2024 · 2 comments
Open

App crashes when creating event with RecurrenceRule(null) #542

Jonny5-5 opened this issue Jun 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Jonny5-5
Copy link

Jonny5-5 commented Jun 7, 2024

Describe the bug
When I create an event with recurrence, but the recurrence object is RecurrenceRule(null) the app crashes.
Android and iOS

To Reproduce
Steps to reproduce the behavior:

var event = Event(
  calendar,
  title: "Title",
  start: startTime,
  end: endTime,
  recurrenceRule: RecurrenceRule(null),
);

var result = await _deviceCalendarPlugin.createOrUpdateEvent(event);

Expected behavior
Create an event with no Recurrence. Change RecurrenceFrequency to be non-nullable or change the handling of it to not use recurrence if RecurrenceFrequency is null.

Flutter doctor
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22631.3593], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.32)
X The current Visual Studio installation is incomplete.
Please use Visual Studio Installer to complete the installation or reinstall Visual Studio.
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.90.0)
[√] Connected device (4 available)
[√] Network resources

@Jonny5-5 Jonny5-5 added the bug Something isn't working label Jun 7, 2024
@thomassth
Copy link
Contributor

I believe you can just omit the recurrenceRule property altogether?

@Jonny5-5
Copy link
Author

True, but if putting null into RecurrenceRule will crash the app, it would be nice if the field was non-nullable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants