-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Feature request] Expose UNTimeIntervalNotificationTrigger with no repeat #2399
Comments
Could you look into a submitting a PR for this? |
Hi @Albert221, does Specifically, the // show a notification in 30 minutes:
initTimezones(); // see the README
plugin.zonedSchedule(
// id, title, body
scheduledDate: TZDateTime.now(tz.location).add(Duration(seconds: 30)),
); |
@Levi-Lesches hey, I understand that I can calculate date to use in
Showing a notification with |
Can you explain what's not working for you, why you must use UNTimeIntervalNotificationTrigger instead of UNCalendarNotificationTrigger? Is the notification not appearing? Are you getting an error? I don't think it's an end goal to expose which type of trigger is being used in the API since they're interchangeable, and the concept isn't relevant for other platforms. I couldn't find anything in the API docs or sources online saying that they should work differently, aside from taking in different inputs. |
The notification just does not appear. That's how iOS is I believe. I may create a simple demo for you tomorrow or later if you want |
I mean, others use this plugin successfully, so I'd bet that's not the case ;). And plus, apple offers the calendar trigger for a reason, it's not like they're simply offering a solution that won't work. Like I mentioned, the docs don't show any sort of difference between the two triggers either. Have you tried following all the setup instructions in the readme? If so, yes, please create a sample repo that we can clone that will reproduce your issue. I personally don't use Mac or iOS, so you'll probably have to wait to see if someone else can help (@MaikuB do you test iOS?) |
@Levi-Lesches yes I do As for the use case mentioned, I agree that |
Hey! Currently, the plugin doesn't allow taking advantage of
UNTimeIntervalNotificationTrigger
with the repeat set to false and it would be really nice to have this possibility exposed within the Flutter plugin.The plugin currently exposes
periodicallyShow
that usesUNTimeIntervalNotificationTrigger
with the repeat true.My use-case is using the plugin for showing a notification on closing the app. It works natively by running a scheduled notification with time interval trigger and no repeat, but does not by other means (it can also be safely called from Flutter side during app exiting so no problem on that part), but the plugin doesn't expose that.
The text was updated successfully, but these errors were encountered: