Open jonasborggren opened 7 months ago
Actually, #28 is probably due to this too.
@jonasborggren It is/was, and the simple modification I posted there has eliminated any further reports in Crashlytics - I could never reproduce the error locally. This package appears abandoned, so I just use locally hosted / modified source in my app now.
Can you post your changes to a fork of this library perhaps? Thanks for letting me know.
We've been using this library in multiple ways without knowing (I wasn't a part in setup of the project), here's what I mean:
StyledToast
widget (StyledToast(child: MaterialApp(..))
)showToast
usingcontext
parameter (showToast
andshowToastWidget
)We had an issue where the provided
context
could be disposed while the toast was showing (and/or was trying to dismiss), causing the following error:At least that's the reason we think it's happening, since it stops happening when we set
context
parameter tonull
or don't usecontext
parameter at all.Why be able to do both?
One way this could be avoided would be to have
showToast
that doesn't have context parameter, and another calledshowToastOn
with a context parameter.Let me know if I can help.