Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

dart - How can i add watermark text over image in Flutter?

I am trying to add watermark text over the image. I am able to set Single text to image but i don't know how to repeat watermark text like below Image.

enter image description here

Code block:


    Container(           
    child: ColorFiltered(      
    colorFilter: 
    ColorFilter.matrix(filters[index]),
     child: Stack(children: [
    Image.file(widget.editedImage,
    filterQuality: FilterQuality.high),
         Positioned(        
                top: yPosition,
                left: xPosition,
                child: GestureDetector(
                    onPanUpdate: (tapInfo) {
                      setState(() {
                        xPosition += tapInfo.delta.dx;
                        yPosition += tapInfo.delta.dy;           
                      });          
                    },           
            child: Container(    
                 alignment: Alignment.center,  
                 child: Text(            
                    'Confidential',     
                style: TextStyle(            
                  fontWeight: FontWeight.bold,        
                  fontSize: 20,      
                 color: Colors.grey[600])),
    ),),)                     
    ])),                
    ),             
    ),            
    );

question from:https://stackoverflow.com/questions/65949469/how-can-i-add-watermark-text-over-image-in-flutter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...