diff --git a/lib/app/shared/helper_functions/get_display.dart b/lib/app/shared/helper_functions/get_display.dart index 44600ad64..360e1dc6b 100644 --- a/lib/app/shared/helper_functions/get_display.dart +++ b/lib/app/shared/helper_functions/get_display.dart @@ -21,7 +21,11 @@ dynamic getDisplay(dynamic value, String languageCode) { orElse: () => displays.firstWhere( (element) => element is Map && element.containsKey('locale'), - orElse: () => null, + orElse: () => displays.firstWhere( + (element) => + element is Map, // if local is not provided + orElse: () => null, + ), ), ), ); diff --git a/lib/app/shared/helper_functions/helper_functions.dart b/lib/app/shared/helper_functions/helper_functions.dart index e37091348..460d09627 100644 --- a/lib/app/shared/helper_functions/helper_functions.dart +++ b/lib/app/shared/helper_functions/helper_functions.dart @@ -1755,7 +1755,8 @@ Future<(String?, String?, String?, String?, String?)> getClientDetails({ ) ?? credSupportedDisplay.firstWhereOrNull( (Display display) => display.locale != null, - ); + ) ?? + credSupportedDisplay.first; // if local is not provided } } } else if (openIdConfiguration.credentialConfigurationsSupported != null) {