Provide a compatible method to conditionally import between WASM and regular Web with also backward compatibility #55796
Labels
area-dart2wasm
Issues for the dart2wasm compiler.
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
Dio is embedded with the Web HTTP request support based on
dart:html
. It also widely supports Dart SDK >=2.18.0 applications.During the release of the WASM support, the
package:web
requires Dart SDK >=3.3.0 which is way smaller than our supported range.Many contributors including ourselves have tried to find a static way to split the Web support into packages without making any breaking changes, but that seems impossible because we need a compatible way to conditionally import libraries based on the environment, which is not provided by Dart if you applied the above restrictions.
web_adapter
cfug/dio#2223Please consider supporting the request or kindly provide a workaround, because there are millions of applications that are using Dio. Huge thanks for any input.
The text was updated successfully, but these errors were encountered: