getTopic method

Topic? getTopic(
  1. String? topicName
)

Implementation

Topic? getTopic(String? topicName) {
  Topic? topic = _cacheManager.get('topic', topicName ?? '');
  if (topic == null && topicName != null) {
    if (topicName == topic_names.TOPIC_ME) {
      topic = TopicMe();
    } else if (topicName == topic_names.TOPIC_FND) {
      topic = TopicFnd();
    } else {
      topic = Topic(topicName);
    }
    _cacheManager.put('topic', topicName, topic);
  }
  return topic;
}