chore: make plus icon color match theme (#2179)

This commit is contained in:
ggurdin 2025-03-19 13:17:59 -04:00 committed by GitHub
parent 84fde3026a
commit 0d4fef8a14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -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,
),

View file

@ -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')}';
}