update static method

Future update(
  1. ServiceData data
)

updates shared ServiceData and which you can listen for on application side using AppClient.updates stream

use this method to notify the application side on the state of the process that is running in foreground-service for example if you're downloading a file in you're foreground-service you may want to update the download progress using this method.

Implementation

static Future update(ServiceData data) async {
  var dataWrapper = ServiceDataWrapper(data);
  await channel.invokeMethod(_SET_SERVICE_DATA, dataWrapper.toJson());
}