Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Convert a hexadecimal string into list of integers

Similar to this question here but for flutter/dart: Easier / better way to convert hexadecimal string to list of numbers in Python?

I have a string with hexadecimal value like 09F911029D74E35BD84156C5635688C0 and I want to return [9, 249, 17, 2, 157, 116, 227, 91, 216, 65, 86, 197, 99, 86, 136, 192]. In python I can just use list(binascii.unhexlify('09F911029D74E35BD84156C5635688C0')). Is there such a function for flutter/dart?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try the Package convert to decode or encode your hex values into desired values

var hex = 09F911029D74E35BD84156C5635688C0;
var result = hex.decode(hex);

also import 'package:convert/convert.dart';

let me know if this works .

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading