Skip to content

reverse() is called after dispose() #4

@volgin

Description

@volgin

If a user navigates away while the button is animating, the widget throws an unhandled exception:

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 484 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:42:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:38:5)
#2      AnimationController.reverse (package:flutter/src/animation/animation_controller.dart:484:7)
#3      _ProgressButtonState._reverse (package:flutter_progress_button/src/widgets/progress_button.dart:210:21)
#4      _ProgressButtonState._onButtonPressed.<anonymous closure> (package:flutter_progress_button/src/widgets/progress_button.dart:161:15)
<asynchronous suspension>
#5      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14)
#6      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink<…>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions