system 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 52

Build Status

Launch system operating system commands. Supported on Linux and macOS.

This is a wrapper around system.3:

Example uses #

For a runable example, see example/main.dart.

Possible uses include:

  • System.invoke('open <Url>');: Open <Url> in the system default web browser.

Notes #

For calling regular shell commands, it's recommended to use dart:io's method. This allows you to get the standard output and supply standard input.

0.2.0 #

  • Upgraded to Dart 2.6 and FFI beta

0.1.0 #

  • Initial release


import 'package:system/system.dart';

// Use the system `open` command to lauch the system default web browser on the
// Url
main() async {
  bool result = System.invoke('open');
  if (result) {
    print('Succesfully launched');
  } else {
    print('Failed launching');

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  system: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:system/system.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
ffi ^0.1.3 0.1.3
Dev dependencies
pedantic ^1.7.0
test ^1.5.0