mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: improve readability in callout
This commit is contained in:
parent
266209caeb
commit
8c544bc8c4
@ -132,7 +132,13 @@ class _CalloutBlockComponentWidgetState
|
|||||||
if (colorString == null) {
|
if (colorString == null) {
|
||||||
return Colors.transparent;
|
return Colors.transparent;
|
||||||
}
|
}
|
||||||
return colorString.toColor();
|
|
||||||
|
final brightness = Theme.of(context).brightness;
|
||||||
|
final bool isDarkMode = brightness == Brightness.dark;
|
||||||
|
|
||||||
|
final Color bgColor = colorString.toColor();
|
||||||
|
|
||||||
|
return isDarkMode ? bgColor.withOpacity(0.3) : bgColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the emoji of the note block from the node's attributes or default to '📌'
|
// get the emoji of the note block from the node's attributes or default to '📌'
|
||||||
|
Loading…
Reference in New Issue
Block a user