flutter_signature_view

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter signature view

Signature Widget library #
Signature widget library


Installing
You should add the following to your pubspec.yaml file:
dependencies:
flutter_signature_view: ^1.1.1
copied to clipboard
Note: If you're using the Flutter master channel, if you encounter build issues, or want to try the latest and greatest then you should use the master branch and not a specific release version. To do so, use the following configuration in your pubspec.yaml:
dependencies:
flutter_signature_view:
git:
url: git://github.com:kzjn10/Flutter_SignatureWidget.git
copied to clipboard
After adding the dependency to your pubspec.yaml you can run: flutter packages get or update your packages using your IDE.
Usage
Simple init SignatureView
SignatureView _signatureView = SignatureView();
copied to clipboard
Init with optional params
SignatureView _signatureView = SignatureView(
backgroundColor: Colors.yellow,
penStyle: Paint()
..color = Colors.blue
..strokeCap = StrokeCap.round
..strokeWidth = 5.0,
onSigned: (data) {
print("On change $data");
},
);
copied to clipboard
Params

backgroundColor - Color. Canvas background color
data - String. Init your signature view with default data (it will generate after your signed from callback function onSigned
penStyle - Paint. Custom your Paint style
onSigned - Function(String). Response list offset as String value. You can use it for data to render default signature view

Access data

Get list offset as string value _signatureView.exportListOffsetToString()
Get data as Bytes _signatureView.exportBytes() -> async function
Get base64 String _signatureView.exportBase64Image() -> async function
Check empty _signatureView.isEmpty
Clear current signature _signatureView.clear()

References

Signature
Signature View And Custom Painter Implementation

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.