Search code examples
flutterdarttype-conversionintuint32

How to convert int into Uint32 in flutter


Is there a way to convert an integer into the format Uint32.

int x = 94;
Uint32 y = x.toUint32(); ///Pseudocode

Solution

  • Dart doesn't have a unsigned integers.

    You can however use a BigInt and use toUnsigned(32) after each operation you do to it.