getDataOwnerKeysForDelegate method

Future<Map<String, String>> getDataOwnerKeysForDelegate(
  1. String delegateId
)

Implementation

Future<Map<String, String>> getDataOwnerKeysForDelegate(String delegateId) async {
  return Future.wait([
    _getHcpHcPartyKeysForDelegate(delegateId),
    _getPatientHcPartyKeysForDelegate(delegateId),
    _getDeviceHcPartyKeysForDelegate(delegateId)
  ]).then((allKeysForDelegateMaps) {
    Map<String, String> keysForDelegate = {};
    allKeysForDelegateMaps.forEach((keys) {
        keysForDelegate.addAll(keys);
    });
    return keysForDelegate;
  });
}