I needed the following data of an android/ios device through my flutter app.
- Total memory size
- Free Memory size
- RAM size
How can I get it ?
You can use system_info plugin to get information about system including total and free size of physical and virtual memory. You can get more detail in here.
// values are in byte
print(SysInfo.getTotalPhysicalMemory());
print(SysInfo.getFreePhysicalMemory());
print(SysInfo.getTotalVirtualMemory());
print(SysInfo.getFreeVirtualMemory());
print(SysInfo.getVirtualMemorySize());
For getting storage space you can use disk_space plugin from here:
// values are in MB
print(await DiskSpace.getFreeDiskSpace);
print(await DiskSpace.getTotalDiskSpace);
system_info plug-in is now marked "discontinued."