The issue in [0] was fixed. So we no longer have to use conditional imports and dart2wasm vs dart2js specific implementations. Instead we use the new extension methods introduced due to [0], namely `Object.toExternalReference` and `ExternalDartReference.toDartObject`. [0] https://github.com/dart-lang/sdk/issues/55183