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
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) {