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

GitHub issues  GitHub pull-requests  Example  Star  Get the library

Exampe use case

  1. Set Address Name to Picture From Camera / Gallery
  2. Set Logo Company to Product Image
  3. 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

Follow my Github : GitHub followers

Libraries

stamp_image