onDestroy method
override
Called when the task is destroyed.
Implementation
@override
Future<void> onDestroy(DateTime timestamp, SendPort? sendPort) async {
debugPrint("[DEBUG] TaskHandler.onDestroy called at $timestamp");
// Clean up resources
await _positionSubscription?.cancel();
_positionSubscription = null;
// Send final status message
sendPort?.send("Foreground location tracking stopped");
}