In java we can just Integer.maxValue but dart there is not this method.
I am using int max = 1<<32 but this doesn't work properly when compiling to javascript.
What is the best way to get the integer maximum value using dart language?
I was using dart_numerics package in my app for another reason and found it while typing

double.maxFinite.toInt() // e.g. 9223372036854775807 on x86_64
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With