Skip to content

Commit

Permalink
fixes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
maeddin committed Feb 6, 2024
1 parent b883df5 commit 5e1e1ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/widgets/custom_animated_toggle_switch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class _CustomAnimatedToggleSwitchState<T>
Future.wait(_loadingFutures).whenComplete(() {
// Check if new future is added since calling method
if (futureLength != _loadingFutures.length) return;
if (widget.loading == null) _loading(false);
if (widget.loading == null && mounted) _loading(false);
_loadingFutures.clear();
});
}
Expand Down

0 comments on commit 5e1e1ca

Please sign in to comment.