For an app, I need a 64bit unsigned int. Looking at dart documentation I did not see how to exactly go about declaring one.
Can anyone tell me how this is done? I will use this “64bit unsigned int” in bitwise operation.
Dart does not have a native unsigned 64-bit integer.
For many operations, you can just use the signed 64-bit integer that an
int is, and interpret it as unsigned. It’s the same bits. That won’t work with division, though. (And if it’s for the web, then an
The simplest general approach is to use a
BigInt and use
toUnsigned(64) after you do any operations on it.
Answered By – lrn
Answer Checked By – Marilyn (FlutterFixes Volunteer)