fix: update locked page button background color (#7470)

This commit is contained in:
Lucas 2025-03-06 16:02:56 +08:00 committed by GitHub
parent 884586f0af
commit fc0fb0b3d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -400,7 +400,7 @@ class LockedPageStatus extends StatelessWidget {
side: BorderSide(color: color),
borderRadius: BorderRadius.circular(6),
),
color: Colors.white.withValues(alpha: 0.75),
color: context.lockedPageButtonBackground,
),
child: FlowyButton(
useIntrinsicWidth: true,
@ -440,7 +440,7 @@ class ReLockedPageStatus extends StatelessWidget {
side: BorderSide(color: iconColor),
borderRadius: BorderRadius.circular(6),
),
color: Colors.white.withValues(alpha: 0.75),
color: context.lockedPageButtonBackground,
),
child: FlowyButton(
useIntrinsicWidth: true,
@ -465,3 +465,12 @@ class ReLockedPageStatus extends StatelessWidget {
);
}
}
extension on BuildContext {
Color get lockedPageButtonBackground {
if (Theme.of(this).brightness == Brightness.light) {
return Colors.white.withValues(alpha: 0.75);
}
return Color(0xB21B1A22);
}
}