FlutterMidiCommand
FlutterMidiCommand copied to clipboard
fix: resolve too many MIDI listeners for UID = xxxx
I have observed a number of crashes in the wild (although I've not been able to reproduce myself) due to repeated registration of the device callback against the MidiManager class.
On closer inspection, It does appear that it is possible when re-creating activities for this plugin to re-run this code multiple times without cleanly tearing it down.
Not sure if this is the best solution to the problem.