FLUTTER ECOSYSTEM

platform_info

Contains info about current platform such as Build mode and Operating system.

Latest version
5.0.0
30-day downloads
23K
Likes
111
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

The platform_info package provides easy access to detailed information about the current execution environment, including the build mode (debug, release, profile) and the operating system. It is designed for developers who need to conditionally execute code based on platform-specific characteristics. The package supports all major platforms: Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform applications that require runtime platform awareness. It offers a lightweight and straightforward API to detect platform details without requiring complex logic or native code.

Use cases
  • Conditional logic based on build mode
  • Detecting operating system at runtime
  • Cross-platform app customization
  • Runtime platform diagnostics
  • Feature flagging by platform
  • Debugging platform-specific issues
Key features
  • Supports all major platforms
  • Provides build mode detection
  • Simple and intuitive API
  • Lightweight and dependency-free
  • Real-time platform info
  • No native code required
Suitable for
  • Cross-platform Flutter apps
  • Apps needing build mode checks
  • Developers targeting multiple OSes
  • Testing and debugging scenarios
  • Apps with platform-specific features
Considerations
  • Does not provide hardware-level details
  • Limited to basic platform and build info
  • Not suitable for advanced device detection
  • Requires manual handling of edge cases
  • No runtime updates after initialization
  • No support for specific device models
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add platform_info

Categories

Dependencies

Dependency list 2 items

Source repository

Related projects