Skip to content

Commit

Permalink
feat: Update issuer meta data #2873
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Sep 4, 2024
1 parent 0eebbd0 commit 33a3263
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class DefaultDisplayDescriptor extends StatelessWidget {
@override
Widget build(BuildContext context) {
final backgroundColor = credentialModel.display?.backgroundColor;
final backgroundImage = credentialModel.display?.backgroundImage?.url;
final backgroundImage = credentialModel.display?.backgroundImage?.url ??
credentialModel.display?.backgroundImage?.uri;

return (backgroundImage != null && backgroundImage != '')
? AspectRatio(
Expand Down Expand Up @@ -97,7 +98,8 @@ class DefaultCardBody extends StatelessWidget {
)
: null;

final logo = credentialModel.display?.logo?.url;
final logo = credentialModel.display?.logo?.url ??
credentialModel.display?.logo?.uri;

return CustomMultiChildLayout(
delegate: CredentialBaseWidgetDelegate(position: Offset.zero),
Expand Down
3 changes: 3 additions & 0 deletions packages/oidc4vc/lib/src/models/openid_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class DisplayDetails extends Equatable {
const DisplayDetails({
this.url,
this.altText,
this.uri,
});

factory DisplayDetails.fromJson(Map<String, dynamic> json) =>
Expand All @@ -214,12 +215,14 @@ class DisplayDetails extends Equatable {
final String? url;
@JsonKey(name: 'alt_text')
final String? altText;
final String? uri;

Map<String, dynamic> toJson() => _$DisplayDetailsToJson(this);

@override
List<Object?> get props => [
url,
altText,
uri,
];
}

0 comments on commit 33a3263

Please sign in to comment.