platform 2.1.1

Platform

Build Status - Coverage Status - Pub

A generic platform abstraction for Dart.

Like dart:io, package:platform supplies a rich, Dart-idiomatic API for accessing platform-specific information.

package:platform provides a lightweight wrapper around the static Platform properties that exist in dart:io. However, it uses instance properties rather than static properties, making it possible to mock out in tests.

2.1.1

  • Bumped maximum Dart SDK version to 2.0.0-dev.infinity

2.1.0

  • Added localeName
  • Bumped minimum Dart SDK version to 1.24.0-dev.0.0

2.0.0

  • Added stdinSupportsAnsi and stdinSupportsAnsi
  • Removed ansiSupported

1.1.1

  • Updated LocalPlatform to use new dart.io API for ansi color support queries
  • Bumped minimum Dart SDK version to 1.23.0-dev.10.0

1.1.0

  • Added ansiSupported
  • Bumped minimum Dart SDK version to 1.23.0-dev.9.0

1.0.2

  • Minor doc updates

1.0.1

  • Added const constructors for Platform and LocalPlatform

1.0.0

  • Initial version

1. Depend on it

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

dependencies:
  platform: "^2.1.1"

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 packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:platform/platform.dart';

Platforms

About

A pluggable, mockable platform abstraction for Dart.

Author

Todd Volkert

Homepage

github.com/google/platform.dart

Documentation

www.dartdocs.org/documentation/platform/2.1.1/

Uploader

tvolkert@google.com
goderbauer@google.com

License

BSD (LICENSE)

Published

Jul 13, 2017