long
long

Reputation: 397

How does flutter convert a hex string to a binary string?

Is there a direct conversion method? I need to convert AA to 1010 1010

Upvotes: 4

Views: 7577

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657128

You can specify the radix for int.parse and toRadixString

print(int.parse('AA',radix: 16).toRadixString(2));

Upvotes: 13

Related Questions