Answers for "float to int dart"

1

how to convert int/int to float dart

int x = 10;   
 double a = x.toDouble();
Posted by: Guest on April-14-2021
2

double to int flutter

double x = 2.5;
 
  int a = x.toInt();
  int b = x.truncate();
  int c = x.round();
  int d = x.ceil();
  int e = x.floor();
 
  print(a); // 2
  print(b); // 2
  print(c); // 3
  print(d); // 3
  print(3); // 2
Posted by: Guest on July-27-2020

Browse Popular Code Answers by Language