toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var contextsCount = this.contextsCount;
  var description = this.description;
  var id = this.id;
  var isLocked = this.isLocked;
  var isUnscreenable = this.isUnscreenable;
  var key = this.key;
  var lastUsed = this.lastUsed;
  var name = this.name;
  var projectsCount = this.projectsCount;
  var schema = this.schema;
  var screensCount = this.screensCount;
  var searcherKey = this.searcherKey;

  final json = <String, Object?>{};
  if (contextsCount != null) {
    json[r'contextsCount'] = contextsCount;
  }
  if (description != null) {
    json[r'description'] = description;
  }
  json[r'id'] = id;
  json[r'isLocked'] = isLocked;
  json[r'isUnscreenable'] = isUnscreenable;
  if (key != null) {
    json[r'key'] = key;
  }
  if (lastUsed != null) {
    json[r'lastUsed'] = lastUsed.toJson();
  }
  json[r'name'] = name;
  if (projectsCount != null) {
    json[r'projectsCount'] = projectsCount;
  }
  json[r'schema'] = schema.toJson();
  if (screensCount != null) {
    json[r'screensCount'] = screensCount;
  }
  if (searcherKey != null) {
    json[r'searcherKey'] = searcherKey;
  }
  return json;
}