getDevice static method

BtDeviceModel? getDevice(
  1. Object event
)

获取插件返回的蓝牙设备信息obj

Implementation

static BtDeviceModel? getDevice(Object event) {
  try {
    Map map = json.decode(event.toString());
    return BtDeviceModel.fromJson(map["data"]);
  } catch (e) {
    return null;
  }
}