Flutter: Conditional Import for Web and Native

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

Alfred Schilken

--

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…

--

--

Alfred Schilken

Software Developer for more than 35 years, started with C and C++, after Java, Python, Groovy, Lua, Golang and Swift now focussing on Dart and Flutter