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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear injected objects before super.dispose() #7

Closed
pedromassango opened this issue Dec 16, 2019 · 0 comments · Fixed by #8
Closed

Clear injected objects before super.dispose() #7

pedromassango opened this issue Dec 16, 2019 · 0 comments · Fixed by #8

Comments

@pedromassango
Copy link
Contributor

pedromassango commented Dec 16, 2019

We have a small issue in the ModularApp widget as we are calling the function that dispose the injected object after the super.dispose() function.

  @override
  void dispose() {
    super.dispose();
    widget.module.cleanInjects();
    print("-- ${widget.module.runtimeType.toString()} DISPOSED");
  }

We also have the same issue in the consumer_widget class:

@override
  void initState() {
    _inject = widget.inject ?? Inject();
    value = _inject.get<T>();
    value.addListener(listener);
    super.initState();
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant