Skip to content

Commit

Permalink
fix: do not show empty extended name and empty phone number
Browse files Browse the repository at this point in the history
  • Loading branch information
24bartixx committed Dec 11, 2024
1 parent 63d40be commit 0f459a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ class _DigitalGuideView extends ConsumerWidget {
.replaceAll("ulica", "ul."),
icon: Assets.svg.contactIcons.compass,
),
ContactIconsModel(
text: digitalGuideResponseExtended.telephoneNumber,
icon: Assets.svg.contactIcons.phone,
// TODO(Bartosh): url not working, nothing happens
url:
"tel:+48${digitalGuideResponseExtended.telephoneNumber.replaceAll("<p>", "").replaceAll("</p>", "")}",
),
if(digitalGuideResponseExtended.telephoneNumber.isNotEmpty)
ContactIconsModel(
text: digitalGuideResponseExtended.telephoneNumber,
icon: Assets.svg.contactIcons.phone,
// TODO(Bartosh): url not working, nothing happens
url:
"tel:+48${digitalGuideResponseExtended.telephoneNumber.replaceAll("<p>", "").replaceAll("</p>", "")}",
),
ContactIconsModel(
text: context.localize
.storeys(digitalGuideResponseExtended.numberOfStoreys),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class HeadlinesSection extends StatelessWidget {
name,
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24),
),
Text(description),
if(description.isNotEmpty) Text(description),
],
),
);
Expand Down

0 comments on commit 0f459a0

Please sign in to comment.