platform_info
빌드 모드 및 운영 체제와 같은 현재 플랫폼에 대한 정보를 포함합니다.
- 스타
- 33
- 포크
- 5
- 최근 푸시(UTC)
- 2024. 8. 13.
- 프로젝트 상태
- 활성
원본 README
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
platform_info
About
Cross-platform io/html package. Works on the web, mobile phones, desktops and console. Fully caches itself on first initialization.
Easy to use, just add to pubspec.yaml as dependency and then import:
import 'package:platform_info/platform_info.dart';
Platform is a singleton, and the default way to access an instance of Platform is to call static getters:
Platform.instance or Platform.I or platform
Usage

Platform Information
Provides platform information such as:
-
Build mode
- release
- profile
- debug
-
Host platform type
- vm (io, desktops, mobile, console, server)
- js (web, html, browser)
-
Operating system
- Fuchsia
- Linux
- MacOS
- Windows
- iOS
- Android
- Unknown
-
Version (
unknownif not available) -
Locale string (
enif not available) -
The number of individual execution units of the machine (
0if not available) -
Operating system is a known type
-
Is a Web-based applications
-
Is a VM supporting for non-web applications
-
Is a mobile device (Android, iOS)
-
Is a desktop device (Windows, macOS, Fuchsia)
-
Is Material design device (Android, Fuchsia)
-
Is Cupertino design device (macOS, iOS)
-
is Linux
-
is macOS
-
is Windows
-
is android
-
is iOS
-
is fuchsia
-
whenmethod allowing to compose a complex condition
Pattern matching
Run functions that satisfy the current state of the platform. You can use nested methods to compose more complex queries.
Operating System
[fuchsia] - whether the operating system is a version of Fuchsia [windows] - whether the operating system is a version of Windows [android] - whether the operating system is a version of Android [iOS] - whether the operating system is a version of iOS [macOS] - whether the operating system is a version of MacOS [linux] - whether the operating system is a version of Linux [unknown] - operating system unknown
Design
[material] - is material (Android, Fuchsia) [cupertino] - is cupertino (macOS, iOS)
Mobile or desktop
[mobile] - is mobile device (Android, iOS) [desktop] - is desktop device (Windows, MacOS, Fuchsia)
VM (IO) or JS (Web)
[js] - is web-based applications [vm] - is I/O supporting for non-web applications
Build mode
[release] - release build mode [profile] - profile build mode [debug] - debug build mode [orElse] - any callback was not called
Sequence of checks
- Operating System
- Design
- Mobile/Desktop
- VM/JS
- Build mode
- Call [orElse] if any callback was not called
Coverage
Changelog
Refer to the Changelog to get all release notes.
Maintainers
Funding
If you want to support the development of our library, there are several ways you can do it:
We appreciate any form of support, whether it's a financial donation or just a star on GitHub. It helps us to continue developing and improving our library. Thank you for your support!
License
Tags
cross, platform, info
분류
사용 중인 의존성
프로젝트에 맞는 저장소를 선택하려면?
사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
- 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
- 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
- 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.
출처 및 관리
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗