I couldn't replicate the problem but I'm getting crash logs on that line with the exception:
Unexpectedly found nil while unwrapping an Optional value.
My suspect is that this line is the culprit:
let streamHandler = self.streamHandlers[eventChannelName]!
If a stream handler is removed then tried to accessed after then the plugin makes the app crash. Maybe changing it to an if let should resolve the issue but the Flutter part will not receive events.
I couldn't replicate the problem but I'm getting crash logs on that line with the exception:
Unexpectedly found nil while unwrapping an Optional value
.My suspect is that this line is the culprit:
let streamHandler = self.streamHandlers[eventChannelName]!
If a stream handler is removed then tried to accessed after then the plugin makes the app crash. Maybe changing it to an
if let
should resolve the issue but the Flutter part will not receive events.