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; // Cao cấp
} else if (totalRamInGB >= 5) {
return 4; // Trung cấp
} else {
return 2; // Phổ thông
}
}