xxxxxxxxxx
double a = 100.90;
int.parse(a.toString()); // throws error
int.parse(a.floor().toString()); // works
xxxxxxxxxx
The mistake was stupid. I did not convert the controller to text. I directly did from controller ==> String. I am keeping this question just in case anybody else has a similar query.