collectInvoke method

String collectInvoke(
  1. DartType type
)

Implementation

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