decodeToken method
Implementation
Map<String, dynamic>? decodeToken() {
// Check if the token is valid
if (!Jwt.isExpired(token)) {
// Decode the token
Map<String, dynamic> decodedToken = Jwt.parseJwt(token);
// Return the decoded token
return decodedToken;
} else {
print("Token is expired.");
return null;
}
}