'Convert int32 to bytes List in dart

I want to convert int32 into bytes array.

specifically i want to convert 477 to bytes array like [el1,el2,el3,el4] i tried utf8.encode(477.toString()); and got [52, 55, 55]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source