flutter
Convert a double to an int in Dart or Flutter
to convert a double value to int value you can use .toInt() method.
double _data = 2.0;
_data = _data.toInt();
Was this helpful?
Similar Posts
- String to double conversion in flutter [Dart]
- How to convert String to Int in Flutter
- Define Int type value in class Flutter
- Get current timestamp in flutter or dart
- Find number of days between two dates in Flutter or Dart
- Send HTTP Get request in Flutter or Dart
- Send HTTP POST request in Flutter or Dart