From 6524dcec5dd4e9ad37251bfbf34933549bc3c334 Mon Sep 17 00:00:00 2001 From: Bibash Shrestha Date: Wed, 3 Apr 2024 12:48:34 +0545 Subject: [PATCH] feat: Remove mandatory:true logic from display #2559 --- .../detail/widgets/credential_subject_data.dart | 7 ------- lib/selective_disclosure/selective_disclosure.dart | 5 ----- .../widget/display_selective_disclosure.dart | 7 ------- 3 files changed, 19 deletions(-) diff --git a/lib/dashboard/home/tab_bar/credentials/detail/widgets/credential_subject_data.dart b/lib/dashboard/home/tab_bar/credentials/detail/widgets/credential_subject_data.dart index 2e614a0cf..b22dadb50 100644 --- a/lib/dashboard/home/tab_bar/credentials/detail/widgets/credential_subject_data.dart +++ b/lib/dashboard/home/tab_bar/credentials/detail/widgets/credential_subject_data.dart @@ -83,13 +83,6 @@ class CredentialSubjectData extends StatelessWidget { if (value.isEmpty) return Container(); - if (value.containsKey('mandatory')) { - final mandatory = value['mandatory']; - if (mandatory is! bool) return Container(); - - if (!mandatory) return Container(); - } - if (value.containsKey('display')) { final displays = value['display']; if (displays is! List) return Container(); diff --git a/lib/selective_disclosure/selective_disclosure.dart b/lib/selective_disclosure/selective_disclosure.dart index 9950e55e7..e469262f4 100644 --- a/lib/selective_disclosure/selective_disclosure.dart +++ b/lib/selective_disclosure/selective_disclosure.dart @@ -108,11 +108,6 @@ class SelectiveDisclosure { if (picture == null) return null; if (picture is! Map) return null; - if (picture.containsKey('mandatory')) { - final mandatory = picture['mandatory']; - if (mandatory is! bool) return null; - } - final valueType = picture['value_type']; if (valueType == null) return null; diff --git a/lib/selective_disclosure/widget/display_selective_disclosure.dart b/lib/selective_disclosure/widget/display_selective_disclosure.dart index 71c93cfe1..c8bd6d4a8 100644 --- a/lib/selective_disclosure/widget/display_selective_disclosure.dart +++ b/lib/selective_disclosure/widget/display_selective_disclosure.dart @@ -158,13 +158,6 @@ class DisplaySelectiveDisclosure extends StatelessWidget { if (value.isEmpty) return null; - if (value.containsKey('mandatory')) { - final mandatory = value['mandatory']; - if (mandatory is! bool) return null; - - // if (!mandatory) return null; - } - if (value.containsKey('display')) { final displays = value['display']; if (displays is! List) return null;