fix: don't show bg painter if not pinned

This commit is contained in:
Prateek Sunal 2024-09-15 21:37:23 +05:30
parent 660b5160f2
commit 6d1ab3f1ca

View File

@ -113,17 +113,18 @@ class _CodeWidgetState extends State<CodeWidget> {
Widget getCardContents(AppLocalizations l10n) {
return Stack(
children: [
Align(
alignment: Alignment.topRight,
child: CustomPaint(
painter: PinBgPainter(
color: colorScheme.pinnedBgColor,
if (widget.code.isPinned)
Align(
alignment: Alignment.topRight,
child: CustomPaint(
painter: PinBgPainter(
color: colorScheme.pinnedBgColor,
),
size: widget.isCompactMode
? const Size(24, 24)
: const Size(39, 39),
),
size: widget.isCompactMode
? const Size(24, 24)
: const Size(39, 39),
),
),
if (widget.code.isTrashed && kDebugMode)
Align(
alignment: Alignment.topLeft,