platform_plus 2.2.0 copy "platform_plus: ^2.2.0" to clipboard
platform_plus: ^2.2.0 copied to clipboard

outdated

Platform Plus is a package for easily figuring out information about the platform your code is running on

example/main.dart

import 'package:platform_plus/platform_plus.dart';

void main() async {
  if (platformPlus.isAndroidNative) {
    // Do something
  } else if (platformPlus.isAndroidWeb) {
    // Do something else
  }

  if (await platformPlus.isPhysicalDevice) {
    // Do something
  }

  if (platformPlus.isUnitTest) {
    // Do something
  }

  if ((await platformPlus.androidVersionCode) >= AndroidVersionCode.s) {
    // Do something
  }

  if ((await platformPlus.iosVersion) >= 13) {
    // Do something
  }
}
13
likes
0
pub points
82%
popularity

Publisher

verified publisherrexios.dev

Platform Plus is a package for easily figuring out information about the platform your code is running on

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

browser_detector, device_info_plus, flutter

More

Packages that depend on platform_plus