21 lines
429 B
Dart
21 lines
429 B
Dart
import "package:flutter/material.dart";
|
|
import "package:process_run/which.dart";
|
|
|
|
class Editor {
|
|
final String name;
|
|
final String command;
|
|
final String commandTemplate;
|
|
// final Icon icon;
|
|
|
|
const Editor(this.name, this.command, this.commandTemplate);
|
|
|
|
bool validateCommand() {
|
|
final String? fullPath = whichSync(command);
|
|
if (fullPath == null) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
}
|