toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final map = <String, dynamic>{
    'method': method,
  };

  if (attribute != null) {
    map['attribute'] = attribute;
  }

  if (values != null) {
    map['values'] = values is List ? values : [values];
  }

  return map;
}