I am writing a Flutter/Dart application and am getting a JWT back from an auth server that has some claims I need to use. I have looked at various (4 so far) Dart JWT libra
Use 'base64Url.normalize()' function. That's what _decodeBase64() does from the answer above!
String getJsonFromJWT(String splittedToken){ String normalizedSource = base64Url.normalize(encodedStr); return utf8.decode(base64Url.decode(normalizedSource)); }