fix: change the animation logic

This commit is contained in:
Lucas Oliveira 2022-07-25 14:20:32 -03:00
parent 02e3e7c49a
commit 07f300f032

View File

@ -34,7 +34,7 @@ class Toggle extends StatelessWidget {
AnimatedPositioned(
duration: const Duration(milliseconds: 150),
top: (style.height - style.thumbRadius) / 2,
left: value ? 1 : style.width - style.thumbRadius - 1,
left: value ? style.width - style.thumbRadius - 1 : 1,
child: Container(
height: style.thumbRadius,
width: style.thumbRadius,