Using postMessage to pass SharedArrayBuffer throws UnimplementedError: structured clone of other type #49610
I have opened an issue for Dart addressing this bug. It was recently merged but will take a while to make its way to a stable version of flutter, so the shim is still required, and will always be required for previous Flutter/Dart versions.
For now they are always loaded but it would be nice to dynamically choose to load or not depending on the dart version.