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

How to load saved image to the canvas? #1

Closed
rommyarb opened this issue Apr 28, 2020 · 2 comments
Closed

How to load saved image to the canvas? #1

rommyarb opened this issue Apr 28, 2020 · 2 comments

Comments

@rommyarb
Copy link

Hi. Thank you for this amazing library!

Here is what I've been doing:

I have saved my drawing (imageBytes) to string by encoding it to base64; and I would like to edit/draw over this saved image.

After I load the image using base64Decode, how do I load imageBytes back to the canvas?
Thank you!

@jamesdixon
Copy link

@rommyarb did you find a solution?

@rommyarb
Copy link
Author

rommyarb commented Jul 6, 2020

@rommyarb did you find a solution?

My solution is:
I use Stack widget, put the saved image at the bottom and put the empty canvas on the top. Set the canvas background color to transparent.

Stack(
  children: <Widget>[
    Image.memory(myImageBytes),
    myTransparentPaintScreen()
  ]
)

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

2 participants