initial commit
This commit is contained in:
20
lib/models/editor.dart
Normal file
20
lib/models/editor.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user