osx 1.2.0

  • README.md
  • Installing
  • Versions
  • 16

OSX for Dart

Tools for working with OSX


  • Easy to use
  • Dictation (Speech Recognition and TTS)
  • Application Interaction (High Level API for working with applications)
  • Scripting Helpers
  • System Information
  • User Interface


import "package:osx/osx.dart";

void main() {
  say("Your computer is named: ${SystemInformation.getComputerName()}");
  say("You are running OSX ${SystemInformation.getVersion()}");
  say("Battery is at ${Battery.getLevel()}%");
  say("There are ${Applications.list().length} apps installed");

  if (Finder.getWindowCount() == 0) {
    say("Finder is not open.");
  } else {
    say("Finder is open.");

  var app = Applications.get("Textual 5");

  if (app.isInstalled()) {
    say("Textual 5 is installed");
  } else {
    say("Textual 5 is not installed.");

  var result = UI.displayDialog("Open Mission Control?", buttons: [

  if (result.button == "Yes") {
    say("Opening Mission Control");

Use this package as a library

1. Depend on it

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

  osx: ^1.2.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:osx/osx.dart';
Version Uploaded Documentation Archive
1.2.0 Jun 6, 2016 Go to the documentation of osx 1.2.0 Download osx 1.2.0 archive
1.1.0 Apr 18, 2015 Go to the documentation of osx 1.1.0 Download osx 1.1.0 archive
1.0.0 Apr 18, 2015 Go to the documentation of osx 1.0.0 Download osx 1.0.0 archive
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 Jul 20, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.69.0
  • pana: 0.11.7


Detected platforms: Flutter, other

Primary library: package:osx/osx.dart with components: io.

Issues and suggestions

Fix lib/src/plist.dart.

Analysis of lib/src/plist.dart failed with 2 errors, 2 hints:

line 34 col 27: The getter 'name' isn't defined for the class 'XmlNode'.

line 37 col 27: The getter 'name' isn't defined for the class 'XmlNode'.

line 20 col 39: 'CryptoUtils' is deprecated and shouldn't be used.

line 87 col 24: 'CryptoUtils' is deprecated and shouldn't be used.

Maintain CHANGELOG.md.

Changelog entries help clients to follow the progress in your code.

Add SDK constraint in pubspec.yaml.

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Package is too old.

The package was released more than two years ago.

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Fix lib/src/utils/time.dart.

Analysis of lib/src/utils/time.dart reported 7 hints, including:

line 63 col 19: 'SUNDAY' is deprecated and shouldn't be used.

line 65 col 19: 'MONDAY' is deprecated and shouldn't be used.

line 67 col 19: 'TUESDAY' is deprecated and shouldn't be used.

line 69 col 19: 'WEDNESDAY' is deprecated and shouldn't be used.

line 71 col 19: 'THURSDAY' is deprecated and shouldn't be used.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use osx.dart.

Fix additional 8 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/utils/http.dart (2 hints)
  • lib/record_parser.dart (Run dartfmt to format lib/record_parser.dart.)
  • lib/src/apps.dart (1 hint)
  • lib/src/common.dart (Run dartfmt to format lib/src/common.dart.)
  • lib/src/dictation.dart (Run dartfmt to format lib/src/dictation.dart.)
  • lib/src/script.dart (Run dartfmt to format lib/src/script.dart.)
  • lib/src/ui.dart (Run dartfmt to format lib/src/ui.dart.)
  • lib/src/where_am_i.dart (1 hint)


Package Constraint Resolved Available
Direct dependencies
crypto >=0.9.0 <1.0.0 0.9.2+1 2.0.6
jsonx >=2.0.0 <3.0.0 2.0.2
xml >=2.0.0 <3.0.0 2.6.0 3.0.0
Transitive dependencies
charcode 1.1.2
convert 1.1.1 2.0.2
matcher 0.12.4
path 1.6.2
petitparser 1.7.6
stack_trace 1.9.3
typed_data 1.1.6