platform_utils 0.0.2 copy "platform_utils: ^0.0.2" to clipboard
platform_utils: ^0.0.2 copied to clipboard

outdated

Returns value or run function based on Platform. If the context is passed, it will get the platform by Theme.of(context).platform. Otherwise, it will use defaultTargetPlatform.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add platform_utils

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  platform_utils: ^0.0.2

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

Import it

Now in your Dart code, you can use:

import 'package:platform_utils/platform_utils.dart';
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Returns value or run function based on Platform. If the context is passed, it will get the platform by Theme.of(context).platform. Otherwise, it will use defaultTargetPlatform.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on platform_utils