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

pull/1817/head
ggurdin 8 months ago committed by GitHub
parent 84fde3026a
commit 0d4fef8a14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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

Loading…
Cancel
Save