How do I get my class to "see" the very useful Shell() ? (I've run "flutter pub add process_run")
JaymeisterJay opened this issue · comments
my pubspec.yaml has "process_run: ^0.12.5+3"...
dependencies:
flutter:
sdk: flutter
sqflite_common_ffi:
path:
process_run: ^0.12.5+3
window_size:
git:
url: https://github.com/google/flutter-desktop-embedding.git
path: plugins/window_size
ref: fd519be1e8398c6b6c2062c2447bac960a71bc02
my linux.dart is tiny but can't ref Shell() see warnings below!...
import 'package:process_run/process_run.dart'; //<= warning: Unused import: 'package:process_run/process_run.dart'.
class Linux {
static Future shellLinux(String cmd) async {
var s = Shell(); //<= warning:The method 'Shell' isn't defined for the type 'Linux'.
await s.run(cmd);
}
}
How do I get my class to "see" the very useful Shell() ? (I've run "flutter pub add process_run")
I'm a dope - the stackoverflow that led me to this project used
import 'package:process_run/process_run.dart';
Should have been...
import 'package:process_run/shell.dart';
...compiles perfectly, I should have simply taken this source directions for usage as gospel and not some other user on stack!
My apologies for wasting your time, and congratulations for an amazing Linux project - if I never boot windows again, sure don't we all win ;)
Glad you found it! No problem. There are unfortunately some old compatibility issues that prevents to include both the old process_run.dart
(that I need to clean up) and shell.dart
.