Flutter-Buddies / App

An app with community features like 'calendar of events' and a showcase of member created widgets
16 stars 18 forks source link

Fix debugLifecycleState exception from Zambrella's widget #16

Closed joeyda3rd closed 3 years ago

joeyda3rd commented 3 years ago

The following exception is being thrown after popping @Zambrella 's widget. From a google search it may be a problem with _animationController.dispose() not being called. It is causing the app to crash after running for a while, the problem does seem to duplicate with each pop.

════════ Exception caught by animation library ═════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4263 pos 12: '_debugLifecycleState != _ElementLifecycle.defunct': is not true.
════════════════════════════════════════════════════════════════════════════════

https://github.com/flutter/flutter/issues/21675

joeyda3rd commented 3 years ago

Added to _ProfileImageState

 @override
  void deactivate() {
    _animationController.dispose();
  }