Flutter或Dart:如何获取设备信息,例如CPU计数,总内存和存储空间等 [英] Flutter or Dart: How to I get device information such as CPU count, total memory and storage, etc

查看:266
本文介绍了Flutter或Dart:如何获取设备信息,例如CPU计数,总内存和存储空间等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望使用Flutter获取设备信息的详细信息,例如CPU计数,位数,总内存,总设备存储空间等.类似于可以在App Store上获得的应用程序.

Using Flutter, I would like to get device information details such as CPU count, bitness, Total Memory, Total device storage, etc. Similar to apps one can get on the App stores.

我查看了device_info软件包,但没有涵盖它.我还查看了system_info(非常好,似乎已被放弃),但仅适用于Android,因为它使用Linux Shell命令来获取信息.我也希望它适用于iOS.

I looked at device_info package, but that does not cover it. I also looked at system_info (which is pretty good, seems abandoned), but only works on Android since it's using Linux shell commands to get the info. I would also like it to work for iOS.

有什么想法吗?

推荐答案

将此软件包添加到您的pubspec.yaml: system_info:^ 0.0.15 ,在此处了解更多信息: system_info .文档说:提供对系统的有用信息(体系结构,位,内核,操作系统,CPU,用户)的轻松访问.

Add this package to your pubspec.yaml: system_info: ^0.0.15, read more about it here : system_info. The docs says: Provides easy access to useful information about the system (architecture, bitness, kernel, operating system, CPU, user).

这篇关于Flutter或Dart:如何获取设备信息,例如CPU计数,总内存和存储空间等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆