WearOsDevice.fromRawData constructor

WearOsDevice.fromRawData(
  1. MethodChannel channel,
  2. Map data
)

Implementation

factory WearOsDevice.fromRawData(MethodChannel channel, Map data) {
  WearOsDevice _deviceInfo = WearOsDevice.fromJson(
      data.map((key, value) => MapEntry(key.toString(), value)));
  _deviceInfo.getCompanionPackageName = () =>
      channel.invokeMethod("getCompanionPackageForDevice", _deviceInfo.id);
  return _deviceInfo;
}