1

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

int x = 94;
Uint32 y = x.toUint32(); ///Pseudocode
GILO
  • 2,444
  • 21
  • 47
  • 1
    flutter has only [int](https://api.flutter.dev/flutter/dart-core/int-class.html) class, there is no `Uint32` class - you mean `Uint32List` or `Uint32Buffer` maybe? – pskink Aug 13 '19 at 08:53

1 Answers1

2

Dart doesn't have a unsigned integers.

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

Muldec
  • 4,641
  • 1
  • 25
  • 44