toJsonString method

String toJsonString()

Implementation

String toJsonString() {
  var json = <String, dynamic>{
    'path': path,
    if (data != null && data?.isNotEmpty == true) 'data': data,
  };
  return jsonEncode(json);
}