base64Padded static method

String base64Padded(
  1. String value
)

Helper function for add base64 decode padding

Implementation

static String base64Padded(String value) {
  String base64Value = value;
  if (base64Value.length % 4 > 0) {
    return base64Value += '=' * (4 - base64Value.length % 4);
  }
  return base64Value;
}