fieldSeparator method

Map<String, String> fieldSeparator(
  1. String data
)

Implementation

Map<String, String> fieldSeparator(String data) {
  var fieldStrings = data.split(',');
  Map<String, String> keyValues = {};
  for (String value in fieldStrings) {
    var subParts = value.split(':');
    keyValues[subParts[0].trim()] = subParts[1].trim();
  }
  return keyValues;
}