sheller 0.3.3 copy "sheller: ^0.3.3" to clipboard
sheller: ^0.3.3 copied to clipboard

Convenience utilities for interacting with and converting shell output.

example/main.dart

import 'package:sheller/sheller.dart';

void main() async {
  // int
  int number = await shell("echo 1");
  assert(number == 1);
  // json
  String data = '{"id":1, "name":"lorem ipsum", "address":"dolor set amet"}';
  Map<String, dynamic> json = await shell('echo $data');
  assert(json.entries.length == 3);
  // List<double>
  List<double> doubleList = await shell('echo 1 2 3');
  assert(doubleList.length == 3);
  // Class version
  ShellSync shellClass = ShellSync("echo 1");
  int id = shellClass.rawResult.pid; // shell.rawResult.runtimeType == ProcessResult
  String stringResult = shellClass.stringResult; // == "1"
  int convertedResult = shellClass(); // == 1
}
16
likes
0
pub points
51%
popularity

Publisher

verified publishervoyver.com

Convenience utilities for interacting with and converting shell output.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on sheller