getBase64TextFromHexadecimalText function

String getBase64TextFromHexadecimalText(
  1. String hexadecimalText
)

Implementation

String getBase64TextFromHexadecimalText(
    String hexadecimalText
    )
{
    return
        base64Encode(
            Uint8List.fromList(
                List<int>.generate(
                    ( hexadecimalText.length / 2 ).floor(),
                    ( index ) => int.parse( hexadecimalText.substring( index * 2, index * 2 + 2 ), radix: 16 )
                    )
                )
            );
}