You are trying to get a value from event as if it is a Map<String, dynamic> on this listener:
flutterFft.onRecorderStateChanged.listen((event)...
Are you sure event is a Map? Maybe it's a List? Or maybe it is a Map, but not a Map<String, dynamic>
I'm not familiar with flutter fft, but I imagine their API docs will have some info for you.