fix: Generalized Color Format (#2221)

This commit is contained in:
Aman Negi 2023-04-09 12:58:35 +05:30 committed by GitHub
parent ad68e61025
commit 4d56b42b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 17 deletions

View File

@ -80,8 +80,8 @@ class _BoardContentState extends State<BoardContent> {
late AppFlowyBoardScrollController scrollManager;
final cardConfiguration = CardConfiguration<String>();
final config = AppFlowyBoardConfig(
groupBackgroundColor: HexColor.fromHex('#F7F8FC'),
final config = const AppFlowyBoardConfig(
groupBackgroundColor: Color(0xffF7F8FC),
);
@override
@ -349,15 +349,6 @@ class _ToolbarBlocAdaptor extends StatelessWidget {
}
}
extension HexColor on Color {
static Color fromHex(String hexString) {
final buffer = StringBuffer();
if (hexString.length == 6 || hexString.length == 7) buffer.write('ff');
buffer.write(hexString.replaceFirst('#', ''));
return Color(int.parse(buffer.toString(), radix: 16));
}
}
Widget? _buildHeaderIcon(GroupData customData) {
Widget? widget;
switch (customData.fieldType) {

View File

@ -25,8 +25,8 @@ class CategoryIcon {
/// Icon of Category
const CategoryIcon({
required this.icon,
this.color = const Color.fromRGBO(211, 211, 211, 1),
this.selectedColor = const Color.fromRGBO(178, 178, 178, 1),
this.color = const Color(0xffd3d3d3),
this.selectedColor = const Color(0xffb2b2b2),
});
/// The icon to represent the category

View File

@ -25,8 +25,8 @@ class CategoryIcon {
/// Icon of Category
const CategoryIcon({
required this.icon,
this.color = const Color.fromRGBO(211, 211, 211, 1),
this.selectedColor = const Color.fromRGBO(178, 178, 178, 1),
this.color = const Color(0xffd3d3d3),
this.selectedColor = const Color(0xffb2b2b2),
});
/// The icon to represent the category

View File

@ -51,7 +51,7 @@ class DandelionColorScheme extends FlowyColorScheme {
tint8: const Color(0xffdefff1),
tint9: _lightTint9,
main1: _lightMain1,
main2: const Color.fromARGB(255, 224, 25, 111),
main2: const Color(0xffe0196f),
shadow: _black,
sidebarBg: _lightBg1,
divider: _lightShader6,
@ -99,7 +99,7 @@ class DandelionColorScheme extends FlowyColorScheme {
tint8: const Color(0xff00F0E2),
tint9: const Color(0xff00BCF0),
main1: _darkMain1,
main2: const Color.fromARGB(255, 224, 25, 111),
main2: const Color(0xffe0196f),
shadow: _black,
sidebarBg: const Color(0xff232B38),
divider: _darkShader3,