scribble
scribble copied to clipboard
background color
trafficstars
hi how change background color ? default background is transparent !
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 !
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