toJson method

Map<String, Object> toJson()

Converts a GitRepoVolumeSource instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  if (directory != null) {
    jsonData['directory'] = directory!;
  }
  jsonData['repository'] = repository;
  if (revision != null) {
    jsonData['revision'] = revision!;
  }

  return jsonData;
}