From 0d4fef8a1488207903e8b0ce4a9eed4782cc32db Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Wed, 19 Mar 2025 13:17:59 -0400 Subject: [PATCH] chore: make plus icon color match theme (#2179) --- lib/pangea/activity_suggestions/create_chat_card.dart | 5 ++++- lib/pangea/common/widgets/customized_svg.dart | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/pangea/activity_suggestions/create_chat_card.dart b/lib/pangea/activity_suggestions/create_chat_card.dart index 3e304d069..f40232e07 100644 --- a/lib/pangea/activity_suggestions/create_chat_card.dart +++ b/lib/pangea/activity_suggestions/create_chat_card.dart @@ -43,7 +43,10 @@ class CreateChatCard extends StatelessWidget { child: CustomizedSvg( svgUrl: "${AppConfig.assetsBaseURL}/${ActivitySuggestionsConstants.plusIconPath}", - colorReplacements: const {}, + colorReplacements: { + "#CDBEF9": + colorToHex(Theme.of(context).colorScheme.secondary), + }, height: 80, width: 80, ), diff --git a/lib/pangea/common/widgets/customized_svg.dart b/lib/pangea/common/widgets/customized_svg.dart index 4239cf60f..0f6d945d5 100644 --- a/lib/pangea/common/widgets/customized_svg.dart +++ b/lib/pangea/common/widgets/customized_svg.dart @@ -138,3 +138,10 @@ class CustomizedSvg extends StatelessWidget { ); } } + +String colorToHex(Color color) { + return '#' + '${(color.r * 255).toInt().toRadixString(16).padLeft(2, '0')}' + '${(color.g * 255).toInt().toRadixString(16).padLeft(2, '0')}' + '${(color.b * 255).toInt().toRadixString(16).padLeft(2, '0')}'; +}