stamp_image 0.0.2 stamp_image: ^0.0.2 copied to clipboard
Stamp_image is a library to create a watermark using any widget
stamp_image #
Stamp Image is a library to create a watermark using any widget, you can customize the position of the watermark and set multiple watermark in one images
Exampe use case #
- Set Address Name to Picture From Camera / Gallery
- Set Logo Company to Product Image
- Set temperature to Picture
Example Code: #
void generate() {
StampImage.create(
context: context,
image: imageFile,
children: [
Positioned(
bottom: 0,
right: 0,
child: _watermarkItem(),
),
Positioned(
top: 0,
left: 0,
child: _logoFlutter(),
)
],
onSuccess: (file) => resultStamp(file),
);
}
If you want to use auto save file to specific location, you can use this syntax. I give an example using path_provider to get path location
void generate() {
Directory? directory = await getDownloadsDirectory();
StampImage.create(
context: context,
image: imageFile,
savePath: directory?.path,
saveFile: true,
children: [
Positioned(
bottom: 0,
right: 0,
child: _watermarkItem(),
),
],
onSuccess: (file) => resultStamp(file),
);
}
About Me #
Visit my website : leeyurani.com