base64Decode function

String? base64Decode(
  1. String val
)

Converts val from base64 to text.

if val is not valid base64 then returns null if library dart:js is not working throws StateError

print(base64Decode('SGVsbG8gV29ybGQ='));

Implementation

String? base64Decode(String val) {
  return MyJS.atob(val);
}