onRepeatEvent method
Called based on the eventAction set in ForegroundTaskOptions
.
- .nothing() : Not use onRepeatEvent callback.
- .once() : Call onRepeatEvent only once.
- .repeat(interval) : Call onRepeatEvent at milliseconds interval.
Implementation
@override
void onRepeatEvent(DateTime timestamp) async {
_count++;
FlutterForegroundTask.updateService(notificationText: "OpenListApp is Running");
// Send data to main isolate.
FlutterForegroundTask.sendDataToMain("OpenListApp is Running");
}