Closed zobo closed 3 years ago
I'm currently using it with Riverpod, which keeps state alive between reloads, with a bool flag in the state that tracks whether it was initiated or not.
I was thinking about adding such a flag for some time now. I'll use this issue to track it.
As it seems, BleManager.createClient should only ever be called once (unless destoryClient is also called) but there is no way to know, if it was already called. BleManager however is a singleton.
Currently I try to solve this with a Wrapper class, that will track this.
Perhaps add a
bool get isCreated
?Are there any other patterns how this is usually solved?
Thank you.