showList static method

Future<void> showList(
  1. List<SvgFile> files, {
  2. Progress? progress,
})

Implementation

static Future<void> showList(List<SvgFile> files,
    {Progress? progress}) async {
  progress ??= noOp;

  final paths = files.map((file) => file.pathTo).toList();

  final process = await Process.start('firefox', paths);

  process.stdout.transform(utf8.decoder).listen((data) {
    progress!(data);
  });

  process.stderr.transform(utf8.decoder).listen((data) {
    progress!(data);
  });
}