toJson method

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

Implementation

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