getAllCapabilities method

Future<Map<String, CapabilityInfo>> getAllCapabilities({
  1. CapabilityFilterType filterType = CapabilityFilterType.all,
})

Get all available capabilities on device network.

Each device can declare their new capability via registerNewCapability method

This method return a Map of CapabilityInfo

Implementation

Future<Map<String, CapabilityInfo>> getAllCapabilities(
    {CapabilityFilterType filterType = CapabilityFilterType.all}) async {
  Map data =
      (await channel.invokeMethod("getAllCapabilities", filterType.index));
  return data.map((key, value) => MapEntry(key.toString(),
      CapabilityInfo.fromJson((value as Map? ?? {}).toMapStringDynamic())));
}