fromJson static method

MessageViewer? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static MessageViewer? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return MessageViewer(
    userId: (json['user_id'] as int?) ?? 0,
    viewDate: (json['view_date'] as int?) ?? 0,
  );
}