device method

Future<Map<String, dynamic>?> device(
  1. String deviceId
)

获得指定设备的信息

Implementation

Future<Map<String, dynamic>?> device(String deviceId) async {
  try {
    String? json =
        await methodChannel.invokeMethod("device", {"deviceId": deviceId});
    if (json == null || json.isEmpty) {
      return Future.value(null);
    }
    return Future.value(convert.json.decode(json));
  } catch (e) {
    rethrow;
  }
}