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

autoDismiss #25

Open
YouSour opened this issue Apr 18, 2022 · 8 comments
Open

autoDismiss #25

YouSour opened this issue Apr 18, 2022 · 8 comments
Assignees

Comments

@YouSour
Copy link

YouSour commented Apr 18, 2022

hi, s.th wrong when i use autoDismiss, when i close toast and suddenly i click to open it again, i got error like this, any idea ?

Error: This widget has been unmounted, so the State no longer has a context (and should be considered defunct).
Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active.
    at Object.throw_ [as throw] (http://localhost:61708/dart_sdk.js:5067:11)
at http://localhost:61708/packages/flutter/src/widgets/widget_inspector.dart.lib.js:12927:23
at cherry_toast._CherryToastState.new.get context [as context] (http://localhost:61708/packages/flutter/src/widgets/widget_inspector.dart.lib.js:12930:28)
at http://localhost:61708/packages/cherry_toast/cherry_toast.dart.lib.js:1536:55
    at internalCallback (http://localhost:61708/dart_sdk.js:26619:11)
@koukibadr
Copy link
Owner

Thanks @YouSour for your feedback, I will check the error the next version will bring the bug-fix to this

@koukibadr koukibadr self-assigned this Apr 18, 2022
@koukibadr koukibadr added the bug Something isn't working label Apr 18, 2022
@YouSour
Copy link
Author

YouSour commented Apr 18, 2022

@koukibadr noted , i wait for it 😄

@koukibadr
Copy link
Owner

Hello @YouSour I just published the bug fix in the new version 1.0.4
https://pub.dev/packages/cherry_toast

@koukibadr koukibadr assigned YouSour and unassigned koukibadr Apr 20, 2022
@koukibadr koukibadr removed the bug Something isn't working label Apr 20, 2022
@YouSour
Copy link
Author

YouSour commented Apr 21, 2022

@koukibadr that error solved , but i got this when i close toast by [X] close button then suddenly i click on barrier background :

Another exception was thrown: _CherryToastState#1fa87(tickers: tracking 1 ticker) was disposed with an active Ticker.
Error: Looking up a deactivated widget's ancestor is unsafe.
At this point the state of the widget's element tree is no longer stable.
To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.
    at Object.throw_ [as throw] (http://localhost:51136/dart_sdk.js:5067:11)
at http://localhost:51136/packages/flutter/src/widgets/widget_inspector.dart.lib.js:24344:21
at framework.StatefulElement.new.[_debugCheckStateIsActiveForAncestorLookup] (http://localhost:51136/packages/flutter/src/widgets/widget_inspector.dart.lib.js:24347:26)
at framework.StatefulElement.new.findAncestorStateOfType (http://localhost:51136/packages/flutter/src/widgets/widget_inspector.dart.lib.js:24388:61)
at Function.of (http://localhost:51136/packages/flutter/src/widgets/widget_inspector.dart.lib.js:20070:63)
at Function.pop (http://localhost:51136/packages/flutter/src/widgets/widget_inspector.dart.lib.js:20049:28)
at http://localhost:51136/packages/cherry_toast/cherry_toast.dart.lib.js:1258:33
    at internalCallback (http://localhost:51136/dart_sdk.js:26619:11)

@koukibadr
Copy link
Owner

@YouSour I didn't get the error when I test it, could you please send me the code snippet how you use the toast ?

@koukibadr
Copy link
Owner

Hello @YouSour check this new version with the bug fix
https://pub.dev/packages/cherry_toast

@YouSour
Copy link
Author

YouSour commented Aug 8, 2022

@koukibadr sorry, a bit late reply , i'm completely busy , thank you for info , i'll try it 😄

@koukibadr
Copy link
Owner

@YouSour if the error is fixed feel free to close this bug

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

No branches or pull requests

2 participants