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

background color #13

Open
mbfakourii opened this issue Apr 14, 2022 · 2 comments
Open

background color #13

mbfakourii opened this issue Apr 14, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@mbfakourii
Copy link

hi how change background color ? default background is transparent !

@mbfakourii
Copy link
Author

mbfakourii commented Apr 14, 2022

i found a way to change background but i think is not good idea !

import 'package:image/image.dart' as image;


ByteData image2 = await notifier.renderImage(format: ImageByteFormat.png);
image.Image image3 = image.decodeImage(image2.buffer.asUint8List())!;
image3.fillBackground(Colors.white.hashCode);
final thumbnail = image.copyResize(image3, width: image3.width,height: image3.height);
Navigator.pop(context, image.encodeJpg(thumbnail));

and not work in web only work in windows !

@timcreatedit timcreatedit added the good first issue Good for newcomers label May 13, 2022
@timcreatedit
Copy link
Owner

This should be an easy implementation, we might get around to it once we have time. Feel free to open a PR.
The sketch model would need a backgroundColor property with a default of transparent. Drawing it in the widget should be straightforward

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

No branches or pull requests

2 participants