triggerButtonImage property
Image?
get
triggerButtonImage
Implementation
Image? get triggerButtonImage {
var base64EncodedImage = _triggerButtonImage;
if (base64EncodedImage == null) return null;
// Remove whitespaces to avoid errors when decoding
final normalized = base64EncodedImage.replaceAll(RegExp(r'\s+'), '');
return Image.memory(base64Decode(normalized));
}
set
triggerButtonImage
(Image? newValue)
Implementation
set triggerButtonImage(Image? newValue) {
if (newValue == null) {
_triggerButtonImage = null;
_controller.updateView();
return;
}
newValue.base64String.then((base64EncodedImage) {
_triggerButtonImage = base64EncodedImage;
return _controller.updateView();
});
}