I need to import dart:js for web only but no success so far. Below is the import line I have tried;
import 'unsupported.dart'
if(dart.library.js) 'dart:js' as js;
In the same file I am using js.context.callMethod() that I wrapped with kIsWeb to ensure it gets executed in web only since javascript can't be run in other environments. Since I have to include a default import like unsupported.dart, how can I mock this callMethod in it?