discoverEndpoints method

Future<List<MatterEndpoint>> discoverEndpoints()

Queries the device for its endpoints/device types/clusters and caches the result in endpoints. Call this once after commissioning (or whenever you want to re-check what the device currently advertises).

Implementation

Future<List<MatterEndpoint>> discoverEndpoints() async {
  endpoints = await GoogleMatterFlutterPlatform.instance.discoverDevice(deviceId);
  return endpoints;
}