New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync rendering of KnowledgePanels with the latest API changes. #667
Conversation
Some CI warnings @jasmeet0817 |
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jasmeet0817!
I haven't seen anything strange; please have a look at my single comment though.
if (knowledgePanel.titleElement!.type == TitleElementType.GRADE) { | ||
return ScoreCard( | ||
iconUrl: knowledgePanel.titleElement.iconUrl!, | ||
description: knowledgePanel.titleElement.title, | ||
cardEvaluation: getCardEvaluationFromKnowledgePanel(knowledgePanel), | ||
iconUrl: knowledgePanel.titleElement!.iconUrl!, | ||
description: knowledgePanel.titleElement!.title, | ||
cardEvaluation: getCardEvaluationFromKnowledgePanelTitleElement( | ||
knowledgePanel.titleElement!, | ||
), | ||
); | ||
} | ||
return KnowledgePanelTitleCard( | ||
knowledgePanelTitleElement: knowledgePanel.titleElement, | ||
knowledgePanelTitleElement: knowledgePanel.titleElement!, | ||
evaluation: knowledgePanel.evaluation, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A switch
syntax would be cleaner, as you're using an enum
as input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This is how it looks: