Flutter: Conditional Import for Web and Native

The Rivepod way to provide platform specific implementations of a midi player

This article shows you how to use different implementations for web and for native. This is tricky when the web implementation needs to import a library which is not available for native platforms. A little example uses this trick to play midi on web and on…