Answers for "convert num to int flutter"

1

dart to int

void main() { 
   double n1 = 2.0; 
   var value = n1.toInt(); 
   print("Output = ${value}"); 
}
Posted by: Guest on November-13-2021
-1

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
Posted by: Guest on November-18-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language