memoryInfo property

Future<Memory?> memoryInfo

Implementation

static Future<Memory?> get memoryInfo async {
  if (!Platform.isAndroid) {
    print('not Supported');
    return null;
  }
  final String? mem = await _channel.invokeMethod('getMemoryInfo');
  final parse = json.decode(mem!);
  return Memory(
    available: int.parse(parse["available_mem"]),
    percentage: double.parse(parse["percentage_mem"]),
    total: int.parse(parse["total_mem"]),
  );
}