toJson method

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

Implementation

@override
Map<String, dynamic> toJson() {
  Map<String, dynamic> map = {'id': id, 'schema': schema};
  if (name != null) {
    map['name'] = name!;
  }
  if (description != null) {
    map['description'] = description!;
  }
  if (styles != null) {
    map['styles'] = styles is String ? styles : styles.toJson();
  }
  if (display != null) {
    map['display'] = display!.toJson();
  }
  return map;
}