isBase64 property

bool get isBase64

Checks if the string is a valid base64 encoded string.

Implementation

bool get isBase64 => regex(
    r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$');