platform_data 0.0.3 copy "platform_data: ^0.0.3" to clipboard
platform_data: ^0.0.3 copied to clipboard

A package that you can find out the platform type of the user

Flutter specifiec platform data. You can use this package when you want to know user's platform type.

Getting started #

Don't forget to initialize the class at first like that:

void main() {
  PlatformData.init();
  // You can get the platform type like this:
  print('platform type: ' + PlatformData.platformType.toString());
  runApp(MyApp());
}

Usage #

TODO: Include short and useful examples for package users. Add longer examples to /example folder.

if (PlatformData.platformType == PlatformType.WEB) {
    // build for web
} else if (PlatformData.platformType == PlatformType.ANDROID) {
    // build for android
}
1
likes
120
points
24
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A package that you can find out the platform type of the user

License

unknown (license)

Dependencies

flutter

More

Packages that depend on platform_data