Skip to content

Commit aaff63f

Browse files
chrisbobbegnprice
authored andcommitted
button: Update Toggle thumb color following change in Figma
The toggle design seems to have changed slightly since we implemented it: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=6070-60763&m=dev Looks like it was just this one detail.
1 parent 64f0359 commit aaff63f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/widgets/button.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ class Toggle extends StatelessWidget {
509509

510510
@override
511511
Widget build(BuildContext context) {
512+
final designVariables = DesignVariables.of(context);
513+
512514
// Figma has this (blue/500) in both light and dark mode.
513515
// TODO(#831)
514516
final activeColor = Color(0xff4370f0);
@@ -550,8 +552,10 @@ class Toggle extends StatelessWidget {
550552
~WidgetState.selected: null,
551553
}),
552554

553-
// Figma has white for "on" and "off" in both light and dark mode.
554-
thumbColor: WidgetStatePropertyAll(Colors.white),
555+
thumbColor: WidgetStateProperty.fromMap({
556+
WidgetState.selected: Colors.white,
557+
~WidgetState.selected: designVariables.mainBackground,
558+
}),
555559

556560
trackColor: trackColor,
557561
trackOutlineColor: WidgetStatePropertyAll(Colors.transparent),

0 commit comments

Comments
 (0)