getCurrentBoard method

Future<String> getCurrentBoard()

Implementation

Future<String> getCurrentBoard() async {
  final res = await _callFunc(
    jsonEncode({"key": "getCurrentBoard", "params": []}),
  );
  // 如果返回值为 null,返回空字符串
  if (res == null) {
    return "";
  }
  // 确保返回值为字符串类型
  if (res is String) {
    return res;
  }
  // 如果不是字符串,尝试转换
  return res.toString();
}