toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.tutor != null) {
    json[r'tutor'] = this.tutor;
  } else {
    json[r'tutor'] = null;
  }
  if (this.customer != null) {
    json[r'customer'] = this.customer;
  } else {
    json[r'customer'] = null;
  }
  if (this.isArchived != null) {
    json[r'is_archived'] = this.isArchived;
  } else {
    json[r'is_archived'] = null;
  }
  if (this.created != null) {
    json[r'created'] = this.created!.toUtc().toIso8601String();
  } else {
    json[r'created'] = null;
  }
  if (this.unreadCount != null) {
    json[r'unread_count'] = this.unreadCount;
  } else {
    json[r'unread_count'] = null;
  }
  if (this.lastMessage != null) {
    json[r'last_message'] = this.lastMessage;
  } else {
    json[r'last_message'] = null;
  }
  if (this.isTrialed != null) {
    json[r'is_trialed'] = this.isTrialed;
  } else {
    json[r'is_trialed'] = null;
  }
  return json;
}