collectInvoke method
Implementation
String collectInvoke(DartType type) {
if(type.isDartCoreList) {
return "toList()";
} else if(type.isDartCoreSet) {
return "toSet()";
}
throw "Unkown type ${type.getDisplayString(withNullability: false)}";
}