promoteToForeground static method
promote the service to foreground
Implementation
static Future<void> promoteToForeground(
String title, {
String subTitle = "",
bool showWhen = false,
String description = "Service is running",
}) async {
var data = {};
data["foreground"] = true;
data["subTitle"] = subTitle;
data["showWhen"] = showWhen;
data["title"] = title;
data["description"] = description;
return await _bgMethodChannel.invokeMethod(
'service.promoteToForeground', data);
}