Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormBuilderSignaturePad initialValue issue #173

Closed
janardhanmupparaju opened this issue Nov 12, 2019 · 2 comments
Closed

FormBuilderSignaturePad initialValue issue #173

janardhanmupparaju opened this issue Nov 12, 2019 · 2 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@janardhanmupparaju
Copy link

janardhanmupparaju commented Nov 12, 2019

I am trying to give initial value to FormBuilderSignaturePad but it is not displaying old signature.

this is code
final GlobalKey _fbKey = GlobalKey();

Container(
child: FormBuilder(
key: _fbKey,
autovalidate: true,
child: FormBuilderSignaturePad(
initialValue: Singleton.signatureImage == null
? null
: Singleton.signatureImage,
decoration: InputDecoration(
labelText: "Signature", border: InputBorder.none),
penColor: Colors.blue,
onChanged: (value) async {
setState(() {
Singleton.signatureImagePath = value;
});
},
attribute: "signature",
height: 100,
),
));

@janardhanmupparaju janardhanmupparaju changed the title FormBuilderSignaturePad pad initialValue issue FormBuilderSignaturePad initialValue issue Nov 15, 2019
@danvick
Copy link
Collaborator

danvick commented Nov 17, 2019

Hi @janardhanmupparaju,
This is a known issue. The problem is that the underlying package we use for the field expects a list of points as the input and not an image.
Currently, I haven't figured out a way to convert an image to a list of points for the initialValue to work.

@danvick danvick added enhancement New feature or request wontfix This will not be worked on labels May 7, 2020
@danvick
Copy link
Collaborator

danvick commented Jul 18, 2020

Fixed in latest versions of the library

@danvick danvick closed this as completed Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants