decodePayload method
dynamic
decodePayload()
Implementation
dynamic decodePayload() {
var payload = jwtToken!.split('.')[1];
if (payload.length % 4 > 0) {
payload =
payload.padRight(payload.length + (4 - payload.length % 4), '=');
}
try {
return json.decode(utf8.decode(base64.decode(payload)));
} catch (err) {
return {};
}
}