Skip to content

Commit

Permalink
fix: bug causing theme to animate when trying to change to same curre…
Browse files Browse the repository at this point in the history
…nt theme - CU-86c0287m8
  • Loading branch information
basemosama committed Aug 22, 2024
1 parent 7a01724 commit 454b409
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/controller/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ class XThemeController extends ValueNotifier<XTheme> {
VoidCallback? onAnimationFinish,
bool forceUpdateNonAnimatedTheme = false,
}) async {
if (value == theme) {
return;
}
isReversed = isReversed ?? index < currentIndex;
currentIndex = index;
if (animate && controller != null) {
Expand Down

0 comments on commit 454b409

Please sign in to comment.