list method

List<PubApp> list()

Return the list of installed applications.

Implementation

List<PubApp> list() {
  //dart_coveralls 0.1.8
  //den 0.1.3
  //discoveryapis_generator 0.6.1
  //...

  var stdout = runlib.run(sdkBin('dart'),
      arguments: ['pub', 'global', 'list'], quiet: true);

  var lines = stdout.trim().split('\n');
  return lines.map((line) {
    line = line.trim();
    if (!line.contains(' ')) return PubApp.global(line);
    return PubApp.global(line.split(' ').first);
  }).toList();
}