from doble to int dart code example
Example 1: double to int in dart
int calc_ranks(ranks) {
double multiplier = .5;
return (multiplier * ranks).round();
}
Example 2: convert from int64 to int dart
double d = 20.5;
int i = d.toInt(); // i = 20
int i = d.round(); // i = 21
int i = d.ceil(); // i = 21
int i = d.floor(); // i = 20