stripNulls function
Implementation
Map stripNulls(Map m) {
Map finMap = {};
for (var i in m.keys) {
if (m[i] is String) {
if (m[i] != '') {
finMap[i] = m[i];
}
} else if (m[i] == null) {
} else if (m[i] is double) {
finMap[i] = m[i].toString();
} else {
finMap[i] = jsonEncode(m[i]);
}
}
return finMap;
}