enableBackground static method

Future<void> enableBackground({
  1. required String title,
  2. required String label,
  3. required String assetName,
  4. bool? vibrate,
})

启动后台服务

Implementation

static Future<void> enableBackground({
  required String title,
  required String label,
  required String assetName,
  bool? vibrate,
}) async {
  await _channel.invokeMethod('enableBackground', {'title': title, 'label': label, 'assetName': assetName, 'vibrate': vibrate ?? true});
}