roundDouble function
Implementation
int roundDouble(double value, int places) {
num mod = pow(10.0, places);
final totalRamInGB = ((value * mod).round().toDouble() / mod);
if (totalRamInGB >= 7) {
return 6;
} else if (totalRamInGB >= 5) {
return 4;
} else {
return 2;
}
}