isPushStopped static method

Future<bool> isPushStopped()

判断推送服务是否停止

Implementation

static Future<bool> isPushStopped() async {
  try {
    final bool isStopped = await _channel.invokeMethod('isPushStopped');
    print('推送服务状态: ${isStopped ? "已停止" : "运行中"}');
    return isStopped;
  } catch (e) {
    print('获取推送服务状态失败: $e');
    return false;
  }
}