ChatMessagesPagingResult.fromJSON constructor

ChatMessagesPagingResult.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

ChatMessagesPagingResult.fromJSON(Map<String, dynamic> json) {
  if (json['entries'] != null) {
    var rawList = (json['entries'] as List<dynamic>);
    if (rawList.isNotEmpty) {
      entries = rawList.map((e) => ChatMessage.fromJSON(e)).toList();
    }
  }
  nextMessagesCursor = json['next'];
  previousMessagesCursor = json['previous'];
  refreshCursor = json['refreshCursor'];
}