tryDecode static method
Decode a string JWT token into a Map<String, dynamic>
containing the decoded JSON payload.
Note: header and signature are not returned by this method.
Returns null if the token is not valid
Implementation
static Map<String, dynamic>? tryDecode(String token) {
try {
return decode(token);
} catch (error) {
return null;
}
}