removePreview function

dynamic removePreview(
  1. String path
)

Implementation

removePreview(String path) async {
  var preview = previews.where(
    (element) {
      return element.path == path;
    },
  ).firstOrNull;
  previews.remove(preview);
  await writeToFile();
  reloader = Timer(
    Duration(milliseconds: 300),
    () {
      server?.stdin.add('R'.codeUnits);
      reloader = null;
    },
  );
  return;
}