Skip to content

Commit

Permalink
Add support of alt_text in background image and logo in issuer metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Sep 10, 2024
1 parent 8f57c20 commit ef02ccb
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,21 @@ class DefaultDisplayDescriptor extends StatelessWidget {
final backgroundColor = credentialModel.display?.backgroundColor;
final backgroundImage = credentialModel.display?.backgroundImage?.url ??
credentialModel.display?.backgroundImage?.uri;
final altText = credentialModel.display?.backgroundImage?.altText ??
credentialModel.display?.backgroundImage?.altText;

return (backgroundImage != null && backgroundImage != '')
? AspectRatio(
aspectRatio: Sizes.credentialAspectRatio,
child: CredentialUrlImage(
url: backgroundImage,
child: DefaultCardBody(
credentialModel: credentialModel,
descriptionMaxLine: descriptionMaxLine,
displyalDescription: displyalDescription,
? Semantics(
label: altText,
child: AspectRatio(
aspectRatio: Sizes.credentialAspectRatio,
child: CredentialUrlImage(
url: backgroundImage,
child: DefaultCardBody(
credentialModel: credentialModel,
descriptionMaxLine: descriptionMaxLine,
displyalDescription: displyalDescription,
),
),
),
)
Expand Down

0 comments on commit ef02ccb

Please sign in to comment.