from int to double flutter code example
Example 1: dart convert int to double
int intVar = 5;
double doubleVar = intVar.toDouble();
Example 2: flutter convert double to int
int calc_ranks(ranks) {
double multiplier = .5;
return (multiplier * ranks).round();
}