addDataToStringFiled static method
dynamic
addDataToStringFiled({})
Implementation
static addDataToStringFiled({
required String key,
required String value,
required String currentString,
}) {
Map<String, String> currentObj;
try {
currentObj = json.decode(currentString);
} catch (err) {
currentObj = {};
}
currentObj[key] = value;
currentString = json.encode(currentObj);
return currentString;
}