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 to image #218

Closed
x8Haider opened this issue Jan 14, 2020 · 4 comments
Closed

FormBuilderSignaturePad to image #218

x8Haider opened this issue Jan 14, 2020 · 4 comments
Labels
solved A solution for this issue had been found

Comments

@x8Haider
Copy link

Hello,

How I can convert the value of FormBuilderSignaturePad to an image.

Appreciate the help.

Regards.

@x8Haider
Copy link
Author

Any help?

@danvick
Copy link
Collaborator

danvick commented Jan 19, 2020

Hi @x8Haider,

This is how you convert:

Image image = Image.memory(data);

@sharpsan
Copy link

How about to save to a file?

@danvick
Copy link
Collaborator

danvick commented May 7, 2020

import 'package:path_provider/path_provider.dart';
import 'dart:io' as io;

var path = (await getApplicationDocumentsDirectory()).path;
var file =  new io.File('$path/${DateTime.now().toUtc().toIso8601String()}.png')..writeAsBytesSync(data);
print(file);

@danvick danvick added the solved A solution for this issue had been found label May 7, 2020
@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
solved A solution for this issue had been found
Projects
None yet
Development

No branches or pull requests

3 participants