Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Scrollbar's hover animation controller error #446

Closed
harlanx opened this issue Jul 31, 2022 · 0 comments 路 Fixed by #356
Closed

馃悰 Scrollbar's hover animation controller error #446

harlanx opened this issue Jul 31, 2022 · 0 comments 路 Fixed by #356
Labels
bug Something isn't working

Comments

@harlanx
Copy link

harlanx commented Jul 31, 2022

Describe the bug
Animation controller.reverse() is called even when the Scrollbar Widget is removed from the tree which produces the error below.

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 487 pos 7: '_ticker != null': AnimationController.reverse() called after AnimationController.dispose()
AnimationController methods should not be used after calling dispose.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      AnimationController.reverse (package:flutter/src/animation/animation_controller.dart:487:7)
#3      _ScrollbarState.handleHover (package:fluent_ui/src/controls/utils/scrollbar.dart:167:30)
<asynchronous suspension>

To Reproduce
Steps to reproduce the behavior:

  1. Create a conditional widget that removes Scrollbar and it's descendants from widget tree.
  2. Hover on scrollbar
  3. Trigger condition to remove Scrollbar widget from tree.
  4. See error

Additional context
It only produces the error if the scrollbar is hovered.

@bdlukaa bdlukaa added the bug Something isn't working label Jul 31, 2022
@bdlukaa bdlukaa linked a pull request Aug 4, 2022 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants