os_type 0.2.2
os_type: ^0.2.2 copied to clipboard
Useful for OS and web environment detection, supports HarmonyOS.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add os_typeThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
os_type: ^0.2.2Alternatively, 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:os_type/os_type.dart';