toJson method

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

Implementation

@override
Map<String, dynamic> toJson() {
  final result = <String, dynamic>{
    'retain': length,
  };
  if (_attributes != null && _attributes!.isNotEmpty) {
    result['attributes'] = attributes;
  }
  return result;
}