Open adummy832 opened 1 year ago
Hey @adummy832, So sorry for the late answer.
As I understand your question, you want to listen for bloc state changes inside a place that is not a build method. The best way of doing it is to listen to the bloc stream itself (a bloc is a decorated stream).
But you will need to close the stream subscription by yourself which can lead to memory leaks.
If you really want to watch() outside build methods Riverpod may be more suitable for your need (https://github.com/rrousselGit/riverpod).
Regards,
Really loving your work here. Greatly appreciated! @LazyTaz
Is it possible to access bloc's state with these kind of scenario whilst also listening to state changes?