removeNamespaceFromKey method

AtKey removeNamespaceFromKey(
  1. AtKey atKey
)

Removes the namespace from the AtKey

Implementation

AtKey removeNamespaceFromKey(AtKey atKey) {
  if (AtClientManager.getInstance().atClient.getPreferences()!.namespace !=
      null) {
    if (atKey.key.contains(
        '.${AtClientManager.getInstance().atClient.getPreferences()!.namespace!}')) {
      atKey.key = atKey.key.replaceAll(
          ('.${AtClientManager.getInstance().atClient.getPreferences()!.namespace!}'),
          '');
    }
  }

  return atKey;
}