handleDataType method
Implementation
Map<String, dynamic> handleDataType(data) {
Map<String, dynamic> newMap = {};
data.forEach((k, v) {
if (v.runtimeType.toString() == "DateTime") {
newMap[k] = (v as DateTime).toIso8601String();
} else if (v.runtimeType.toString() == "bool") {
newMap[k] = v as bool ? 1 : 0;
} else {
newMap[k] = v;
}
});
return newMap;
}