toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{'type': type};
  if (ttl != null) {
    json['ttl'] = ttl;
  }
  return json;
}