Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnimplementedError #3

Open
bonifacemacara opened this issue Sep 14, 2022 · 4 comments
Open

UnimplementedError #3

bonifacemacara opened this issue Sep 14, 2022 · 4 comments

Comments

@bonifacemacara
Copy link

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: UnimplementedError
#0      CanvasElement.context2D (package:universal_html/src/html/dom/element_subclasses.dart:380:51)
#1      CanvasElement.context2D (package:universal_html/src/html/dom/element_subclasses.dart)
#2      WebImageDownloader.downloadImageFromUInt8List (package:image_downloader_web/src/web_image_downloader.dart:44:24)
@hrvojecukman
Copy link
Owner

Can you please provide more info because I couldn't reproduce the error. Which platform were you using?

@gfasidis
Copy link

gfasidis commented Dec 29, 2022

Hello I have the same error in MacOS Platform (arm edition)

Error log:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: UnimplementedError
#0 CanvasElement.context2D (package:universal_html/src/html/dom/element_subclasses.dart:380:51)
#1 CanvasElement.context2D (package:universal_html/src/html/dom/element_subclasses.dart)
#2 WebImageDownloader.downloadImageFromUInt8List (package:image_downloader_web/src/web_image_downloader.dart:44:24)

#3 WebImageDownloader.downloadImageFromWeb (package:image_downloader_web/src/web_image_downloader.dart:21:7)

#4 _ServiceDataActivityState.saveImage (package:aesthetic_center_crm/Activities/service_data_activity.dart:125:7)

Code:
if(kIsWeb || Platform.isMacOS) {
await WebImageDownloader().downloadImageFromWeb(urlPhoto,name: "appointmentPhoto").then((value) {
Navigator.pop(dialogIndicatorContext!);
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Done!")));
},);
}

@hrvojecukman
Copy link
Owner

Sorry for the inconvenience but this package is only for Flutter Web. In the Readme.MD the first sentence says: Download images from URL on Flutter Web but I am open to any suggestions to be more clear about its usage. All the help on how the Readme or the package could be improved would be appreciated

@gfasidis
Copy link

Don't worry. I miss understand with pub.dev site where your package also has compatibility with Mac OS. So I assume that you forget to update the readme file
Στιγμιότυπο 2022-12-30, 13 10 54

I want to ask another question off topic maybe but from web in mobile I can't download the image...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants