by @kodeazy

flutter How to remove decimal value from double in dart file?

Home » flutter » flutter How to remove decimal value from double in dart file?
  • Here we use toInt() function to convert double value to int in dart.
  • Example

    void main(){
    double number = 123.45;
    print(number.toInt());
    }

    Output:

    123