getDefaultValueByType function
Implementation
String getDefaultValueByType(String type,String className){
if (type == 'bool') {
return 'false';
}else if (type == 'num') {
return '0';
}else if (type == 'String') {
return "\"\"";
}else if (type == "List") {
return 'List.empty()';
}else if (type.contains("Map<")) {
return 'Map<String,dynamic>()';
}else if (type.contains("List<")) {
return 'List.empty()';
}
return "";
}