toJson method

Map<String, dynamic> toJson()

Converts an instance of Topics to a JSON map.

This method is used to serialize Topics instances into a map structure that can easily be converted to JSON. This is useful for storing the instance in a database or sending it over a network.

Returns: A map representing the serialized form of the Topics instance.

Implementation

Map<String, dynamic> toJson() => {
      "topicName": topicName,
      "topicId": topicId,
      "metaData": metaData,
    };