toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts an object to JSON.

Implementation

@override
Map<String, dynamic> toJson() {
  final returnValue = <String, dynamic>{
    '\$hash': 'fcdad815',
    '\$name': 'ForumTopic',
    'flags': flags,
    'my': my,
    'closed': closed,
    'pinned': pinned,
    'short': short,
    'hidden': hidden,
    'titleMissing': titleMissing,
    'id': id,
    'date': date.toIso8601String(),
    'peer': peer,
    'title': title,
    'iconColor': iconColor,
    'iconEmojiId': iconEmojiId,
    'topMessage': topMessage,
    'readInboxMaxId': readInboxMaxId,
    'readOutboxMaxId': readOutboxMaxId,
    'unreadCount': unreadCount,
    'unreadMentionsCount': unreadMentionsCount,
    'unreadReactionsCount': unreadReactionsCount,
    'unreadPollVotesCount': unreadPollVotesCount,
    'fromId': fromId,
    'notifySettings': notifySettings,
    'draft': draft,
  };

  // Finished toJson.
  return returnValue;
}