|
@@ -69,17 +69,26 @@ class _PDFBottomAnnotFunWidgetState extends State<PDFBottomAnnotFunWidget> {
|
|
|
annotType: AnnotationType.signature,
|
|
|
normalImagePath: 'assets/images/ic_reader_signature.svg',
|
|
|
selectImagePath: 'assets/images/ic_reader_signature_select.svg',
|
|
|
- attributeBean: AnnotAttributeBean(color: Colors.transparent)),
|
|
|
+ attributeBean: AnnotAttributeBean(
|
|
|
+ color: Colors.transparent, shapeType: AnnotationType.signature)),
|
|
|
AnnotBean(
|
|
|
annotType: AnnotationType.stamp,
|
|
|
normalImagePath: 'assets/images/ic_reader_stamp.svg',
|
|
|
selectImagePath: 'assets/images/ic_reader_stamp_select.svg',
|
|
|
- attributeBean: AnnotAttributeBean(color: Colors.transparent)),
|
|
|
+ attributeBean: AnnotAttributeBean(
|
|
|
+ color: Colors.transparent, shapeType: AnnotationType.stamp)),
|
|
|
AnnotBean(
|
|
|
annotType: AnnotationType.link,
|
|
|
normalImagePath: 'assets/images/ic_reader_link.svg',
|
|
|
selectImagePath: 'assets/images/ic_reader_link_select.svg',
|
|
|
- attributeBean: AnnotAttributeBean(color: Colors.transparent)),
|
|
|
+ attributeBean: AnnotAttributeBean(
|
|
|
+ color: Colors.transparent, shapeType: AnnotationType.link)),
|
|
|
+ AnnotBean(
|
|
|
+ annotType: AnnotationType.redact,
|
|
|
+ normalImagePath: 'assets/images/ic_reader_redact.svg',
|
|
|
+ selectImagePath: 'assets/images/ic_reader_redact_select.svg',
|
|
|
+ attributeBean: AnnotAttributeBean(
|
|
|
+ color: Colors.transparent, shapeType: AnnotationType.redact)),
|
|
|
];
|
|
|
|
|
|
@override
|
|
@@ -128,7 +137,9 @@ class _PDFBottomAnnotFunWidgetState extends State<PDFBottomAnnotFunWidget> {
|
|
|
setState(() {
|
|
|
selectAnnot = annotBean.annotType;
|
|
|
});
|
|
|
- showAttributeModalBottomSheet(context, annotBean);
|
|
|
+ if(selectAnnot != AnnotationType.link && selectAnnot != AnnotationType.redact){
|
|
|
+ showAttributeModalBottomSheet(context, annotBean);
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -206,8 +217,10 @@ class _PDFBottomAnnotFunWidgetState extends State<PDFBottomAnnotFunWidget> {
|
|
|
});
|
|
|
}, () {
|
|
|
setState(() {
|
|
|
- if (selectAnnot == AnnotationType.signature) {
|
|
|
+ if (selectAnnot == AnnotationType.signature ||
|
|
|
+ selectAnnot == AnnotationType.stamp) {
|
|
|
selectAnnot = AnnotationType.unknown;
|
|
|
+ setCPDFReaderViewFocusType(selectAnnot);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
@@ -262,10 +275,6 @@ class _PDFBottomAnnotFunWidgetState extends State<PDFBottomAnnotFunWidget> {
|
|
|
AnnotAttributeBean shape = await getAnnotAttribute(AnnotationType.shape);
|
|
|
AnnotAttributeBean freeText =
|
|
|
await getAnnotAttribute(AnnotationType.freetext);
|
|
|
- AnnotAttributeBean signature =
|
|
|
- await getAnnotAttribute(AnnotationType.signature);
|
|
|
- AnnotAttributeBean stamp = await getAnnotAttribute(AnnotationType.stamp);
|
|
|
- AnnotAttributeBean link = await getAnnotAttribute(AnnotationType.link);
|
|
|
setState(() {
|
|
|
for (var element in annotFunList) {
|
|
|
switch (element.annotType) {
|
|
@@ -292,15 +301,6 @@ class _PDFBottomAnnotFunWidgetState extends State<PDFBottomAnnotFunWidget> {
|
|
|
case AnnotationType.freetext:
|
|
|
element.attributeBean = freeText;
|
|
|
break;
|
|
|
- case AnnotationType.signature:
|
|
|
- element.attributeBean = signature;
|
|
|
- break;
|
|
|
- case AnnotationType.stamp:
|
|
|
- element.attributeBean = stamp;
|
|
|
- break;
|
|
|
- case AnnotationType.link:
|
|
|
- element.attributeBean = link;
|
|
|
- break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|