base64StringToBytes static method

Uint8List base64StringToBytes(
  1. String input
)

Converts a Base 64 encoded String into list of bytes.

Decoder ignores "\r\n" sequences from input.

Accepts both URL safe and unsafe Base 64 encoded strings.

Throws a FormatException exception if input contains invalid characters.

Based on RFC 4648

Implementation

static Uint8List base64StringToBytes(String input) =>
    Base64Decoder().convert(input);