system_info_fetch 0.0.0 system_info_fetch: ^0.0.0 copied to clipboard
A library for get system info detail like ram or proccesor ram in dart support client side and server side.
import 'package:system_info_fetch/system_info_fetch.dart';
String systemInfo() {
int megabyte = 1024 * 1024;
var message = "";
message += '\nKernel architecture : ${SysInfo.kernelArchitecture}';
message += '\nKernel bitness : ${SysInfo.kernelBitness}';
message += '\nKernel name : ${SysInfo.kernelName}';
message += '\nKernel version : ${SysInfo.kernelVersion}';
message += '\nOperating system name : ${SysInfo.operatingSystemName}';
message += '\nOperating system version: ${SysInfo.operatingSystemVersion}';
message += '\nUser directory : ${SysInfo.userDirectory}';
message += '\nUser id : ${SysInfo.userId}';
message += '\nUser name : ${SysInfo.userName}';
message += '\nUser space bitness : ${SysInfo.userSpaceBitness}';
final processors = SysInfo.processors;
message += '\nNumber of processors : ${processors.length}';
message += '\n Architecture : ${processors.first.architecture}';
message += '\n Name : ${processors.first.name}';
message += '\n Socket : ${processors.first.socket}';
message += '\n Vendor : ${processors.first.vendor}';
message += '\nTotal physical memory : ${SysInfo.getTotalPhysicalMemory() ~/ megabyte} MB';
message += '\nFree physical memory : ${SysInfo.getFreePhysicalMemory() ~/ megabyte} MB';
message += '\nTotal virtual memory : ${SysInfo.getTotalVirtualMemory() ~/ megabyte} MB';
message += '\nFree virtual memory : ${SysInfo.getFreeVirtualMemory() ~/ megabyte} MB';
message += '\nVirtual memory size : ${SysInfo.getVirtualMemorySize() ~/ megabyte} MB';
return message;
}