fyne.ScheduledNotification
import "fyne.io/fyne/v2"
Usage
type ScheduledNotification
type ScheduledNotification struct {
*Notification
// DeliveryTime is the time at which the notification is scheduled to be delivered.
DeliveryTime time.Time
}
ScheduledNotification represents a notification that has been queued for delivery at a future time. Instances are returned from [App.ScheduleNotification] and can be cancelled using the ID with [App.CancelScheduledNotification].
2.8func NewScheduledNotification
func NewScheduledNotification(id string, n *Notification, deliverAt time.Time) *ScheduledNotification
NewScheduledNotification builds a scheduled notification record with a known ID. Application code should not normally call this directly - prefer [App.ScheduleNotification] which assigns an ID and arranges delivery.
This is exposed for use by app implementations and advanced testing.
2.8func (*ScheduledNotification) Cancel
func (s *ScheduledNotification) Cancel() error
Cancel will remove this scheduled notification from future posting. If your application might want to cancel a future notification after it has been restarted you should persist the ID value and then use CancelScheduledNotification.
func (*ScheduledNotification) ID
func (s *ScheduledNotification) ID() string
ID returns the unique identifier for this scheduled notification. Pass this value to [App.CancelScheduledNotification] to cancel a pending delivery.