dint-dev / universal_html

Cross-platform 'dart:html'.
https://pub.dev/packages/universal_html
Apache License 2.0
201 stars 63 forks source link

Error: No named parameter with the name 'src'. #104

Open jasminder opened 1 month ago

jasminder commented 1 month ago

I am trying to create html image element using the following code: final html.ImageElement imgElement = html.ImageElement(src: url);

And I am getting this error on iOS/Android: Error: No named parameter with the name 'src'.

It is working fine on web as it should, but, for iOS, I will have to comment this out.

iKK001 commented 2 weeks ago

same here - any solution to this ??

final imageElement = html.ImageElement(src: url); does not work on Android or iOS

I tried to exclude it from any mobile compilation by:

if (kIsWeb) {
    final imageElement = html.ImageElement(src: url);
   // ..
}

But the compiler still crashes when compiling for mobile. Any solution to this ?

iKK001 commented 1 week ago

Any news ? I am pretty desperate with this - since my product depends on this library....