flutter_platform_selector 2.0.1 copy "flutter_platform_selector: ^2.0.1" to clipboard
flutter_platform_selector: ^2.0.1 copied to clipboard

platform selector.

flutter_platform_selector #

Pub Awesome Flutter Awesome Flutter License

根据平台获取对应数据, 来源于 ReactNativePlatform module

使用 #

🔩 安装

pubspec.yaml 添加依赖

dependencies:
  flutter_platform_selector: <last_version>

🔨 使用

Text(PlatformSelector.select(
      ios: 'iOS',
      android: 'Android',
      fuchsia: 'Fuchsia',
      desktop: 'Desktop',
      web: 'Web'));

Changelog #

Refer to the Changelog to get all release notes.