dhisUrl method

  1. @override
Future<String> dhisUrl()
override

Implementation

@override
Future<String> dhisUrl() {
  final apiFilter =
      QueryFilter.getApiFilters(this.repository.columns, this.filters);

  if ((this.selected).isNotEmpty) {
    return Future.value(
        'optionGroups.json${apiFilter != null ? '?$apiFilter&' : '?'}fields=${this.selected.join(',')}&paging=false');
  }

  return Future.value(
      'optionGroups.json${apiFilter != null ? '?$apiFilter&' : '?'}fields=id,name,shortName,options[code,name]&paging=false');
}