toMap method

Map<String, String>? toMap()

Implementation

Map<String, String>? toMap() {
  if (this == null) {
    return null;
  } else {
    if (this?.value?.isNotEmpty != true) return null;
    return {
      "label": this!.label,
      "value": this!.value,
    }.valuesNotNull();
  }
}