/syncfusion-flutter:syncfusion-flutter-signature-padfrom Syncfusion Flutter Widgets
Implements Syncfusion Flutter SignaturePad (SfSignaturePad) for capturing handwritten signatures and drawings in Flutter apps. Use when implementing digital signatures, document signing, e-signature fields, or touch/stylus drawing surfaces. This skill covers stroke customization, background color, saving signatures as images, and clearing the pad.
Ships in Syncfusion Flutter Widgets. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill covers the Syncfusion Flutter SfSignaturePad component, which provides an elegant and intuitive way to capture handwritten signatures or drawings in your Flutter applications. The component offers smooth drawing experience with touch and stylus support, along with powerful customization and export capabilities.
Use this skill when you need to:
SfSignaturePad is a Flutter widget that captures smooth, high-quality signatures or drawings through touch or stylus input. It provides a customizable drawing surface with features like stroke customization, background images, minimum stroke validation, and multiple export formats.
📄 Read: references/getting-started.md
📄 Read: references/overview.md
📄 Read: references/customization.md
📄 Read: references/saving-exporting.md
📄 Read: references/callbacks.md
📄 Read: references/advanced-features.md
📄 Read: references/accessibility.md
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_signaturepad/signaturepad.dart';
class BasicSignaturePad extends StatelessWidget {
final GlobalKey<SfSignaturePadState> _signaturePadKey = GlobalKey();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Sign Here')),
body: Column(
children: [
Padding(
padding: EdgeInsets.all(16),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
),
child: SfSignaturePad(
key: _signaturePadKey,
backgroundColor: Colors.white,
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
onPressed: () => _signaturePadKey.currentState!.clear(),
child: Text('Clear'),
),
ElevatedButton(
onPressed: _saveSignature,
child: Text('Save'),
),
],
),
],
),
);
}
Future<void> _saveSignature() async {
final image = await _signaturePadKey.currentState!.toImage();
// Process the image (save to file, upload, etc.)
}
}
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_signaturepad/signaturepad.dart';
class CustomSignaturePad extends StatelessWidget {
final GlobalKey<SfSignaturePadState> _signaturePadKey = GlobalKey();
@override
Widget build(BuildContext context) {
return SfSignaturePad(
key: _signaturePadKey,
backgroundColor: Colors.grey[100],
strokeColor: Colors.blue,
minimumStrokeWidth: 1.0,
maximumStrokeWidth: 4.0,
onDrawStart: () {
print('Started drawing');
return true;
},
onDraw: (offset, time) {
print('Drawing at: $offset');
},
onDrawEnd: () {
print('Finished drawing');
},
);
}
}
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_signaturepad/signaturepad.dart';
import 'dart:ui' as ui;
class ValidatedSignaturePad extends StatefulWidget {
@override
_ValidatedSignaturePadState createState() => _ValidatedSignaturePadState();
}
class _ValidatedSignaturePadState extends State<ValidatedSignaturePad> {
final GlobalKey<SfSignaturePadState> _signaturePadKey = GlobalKey();
String _validationMessage = '';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Sign Document')),
body: Column(
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(16),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 2),
borderRadius: BorderRadius.circular(8),
),
child: SfSignaturePad(
key: _signaturePadKey,
backgroundColor: Colors.white,
strokeColor: Colors.black,
minimumStrokeWidth: 2.0,
maximumStrokeWidth: 4.0,
),
),
),
),
if (_validationMessage.isNotEmpty)
Padding(
padding: EdgeInsets.all(8),
child: Text(
_validationMessage,
style: TextStyle(color: Colors.red),
),
),
Padding(
padding: EdgeInsets.all(16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
OutlinedButton(
onPressed: _clearSignature,
child: Text('Clear'),
),
ElevatedButton(
onPressed: _saveSignature,
child: Text('Save Signature'),
),
],
),
),
],
),
);
}
void _clearSignature() {
setState(() {
_signaturePadKey.currentState!.clear();
_validationMessage = '';
});
}
Future<void> _saveSignature() async {
// Validate minimum stroke count
if (_signaturePadKey.currentState!.toImage == null) {
setState(() {
_validationMessage = 'Please provide a signature';
});
return;
}
try {
final ui.Image image = await _signaturePadKey.currentState!.toImage(
pixelRatio: 3.0,
);
// Convert to bytes
final byteData = await image.toByteData(format: ui.ImageByteFormat.png);
final bytes = byteData!.buffer.asUint8List();
// Save or upload the signature
print('Signature saved: ${bytes.length} bytes');
setState(() {
_validationMessage = 'Signature saved successfully!';
});
// Navigate or perform next action
} catch (e) {
setState(() {
_validationMessage = 'Error saving signature: $e';
});
}
}
}
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_signaturepad/signaturepad.dart';
class SignatureWithBackground extends StatelessWidget {
final GlobalKey<SfSignaturePadState> _signaturePadKey = GlobalKey();
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
image: DecorationImage(
image: AssetImage('assets/signature_background.png'),
fit: BoxFit.cover,
opacity: 0.3,
),
),
child: SfSignaturePad(
key: _signaturePadKey,
backgroundColor: Colors.transparent,
strokeColor: Colors.blue[900]!,
minimumStrokeWidth: 2.0,
maximumStrokeWidth: 5.0,
),
);
}
}
class DocumentSigningFlow extends StatefulWidget {
@override
_DocumentSigningFlowState createState() => _DocumentSigningFlowState();
}
class _DocumentSigningFlowState extends State<DocumentSigningFlow> {
final GlobalKey<SfSignaturePadState> _signaturePadKey = GlobalKey();
bool _hasSignature = false;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Sign Agreement')),
body: Column(
children: [
// Document preview
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.all(16),
child: Text('Agreement Terms...'),
),
),
// Signature section
Padding(
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Your Signature',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
SizedBox(height: 8),
Container(
height: 200,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(8),
),
child: SfSignaturePad(
key: _signaturePadKey,
backgroundColor: Colors.white,
strokeColor: Colors.black,
minimumStrokeWidth: 2.0,
maximumStrokeWidth: 4.0,
onDrawEnd: () {
setState(() => _hasSignature = true);
},
),
),
],
),
),
// Action buttons
Padding(
padding: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: OutlinedButton(
onPressed: _clearSignature,
child: Text('Clear'),
),
),
SizedBox(width: 16),
Expanded(
child: ElevatedButton(
onPressed: _hasSignature ? _submitSignature : null,
child: Text('Submit'),
),
),
],
),
),
],
),
);
}
void _clearSignature() {
setState(() {
_signaturePadKey.currentState!.clear();
_hasSignature = false;
});
}
Future<void> _submitSignature() async {
final image = await _signaturePadKey.currentState!.toImage(pixelRatio: 3.0);
// Submit signature with document
Navigator.pop(context, image);
}
}
class MultipleSignaturesForm extends StatefulWidget {
@override
_MultipleSignaturesFormState createState() => _MultipleSignaturesFormState();
}
class _MultipleSignaturesFormState extends State<MultipleSignaturesForm> {
final GlobalKey<SfSignaturePadState> _applicantKey = GlobalKey();
final GlobalKey<SfSignaturePadState> _witnessKey = GlobalKey();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Signatures Required')),
body: SingleChildScrollView(
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildSignatureField(
'Applicant Signature',
_applicantKey,
),
SizedBox(height: 24),
_buildSignatureField(
'Witness Signature',
_witnessKey,
),
SizedBox(height: 24),
ElevatedButton(
onPressed: _submitAllSignatures,
child: Text('Submit All'),
),
],
),
),
);
}
Widget _buildSignatureField(String label, GlobalKey<SfSignaturePadState> key) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label, style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
SizedBox(height: 8),
Container(
height: 150,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(8),
),
child: SfSignaturePad(
key: key,
backgroundColor: Colors.white,
strokeColor: Colors.blue[900]!,
),
),
TextButton(
onPressed: () => key.currentState!.clear(),
child: Text('Clear'),
),
],
);
}
Future<void> _submitAllSignatures() async {
final applicantImage = await _applicantKey.currentState!.toImage();
final witnessImage = await _witnessKey.currentState!.toImage();
// Submit both signatures
}
}
class SignatureDisplay extends StatefulWidget {
final Uint8List signatureData;
SignatureDisplay({required this.signatureData});
@override
_SignatureDisplayState createState() => _SignatureDisplayState();
}
class _SignatureDisplayState extends State<SignatureDisplay> {
@override
Widget build(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(8),
),
child: Image.memory(
widget.signatureData,
fit: BoxFit.contain,
),
);
}
}
class InteractiveSignaturePad extends StatefulWidget {
@override
_InteractiveSignaturePadState createState() => _InteractiveSignaturePadState();
}
class _InteractiveSignaturePadState extends State<InteractiveSignaturePad> {
final GlobalKey<SfSignaturePadState> _signaturePadKey = GlobalKey();
bool _isDrawing = false;
int _strokeCount = 0;
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
height: 300,
decoration: BoxDecoration(
border: Border.all(
color: _isDrawing ? Colors.blue : Colors.grey,
width: _isDrawing ? 2 : 1,
),
borderRadius: BorderRadius.circular(8),
),
child: SfSignaturePad(
key: _signaturePadKey,
backgroundColor: Colors.white,
strokeColor: Colors.black,
minimumStrokeWidth: 2.0,
maximumStrokeWidth: 4.0,
onDrawStart: () {
setState(() {
_isDrawing = true;
_strokeCount++;
});
return true;
},
onDrawEnd: () {
setState(() {
_isDrawing = false;
});
},
),
),
SizedBox(height: 8),
Text(
_isDrawing ? 'Drawing...' : 'Stroke count: $_strokeCount',
style: TextStyle(color: Colors.grey[600]),
),
],
);
}
}
backgroundColor - Background color of the signature pad (Color)strokeColor - Color of the signature strokes (Color, default: Colors.black)minimumStrokeWidth - Minimum width of strokes (double, default: 1.0)maximumStrokeWidth - Maximum width of strokes (double, default: 4.0)onDrawStart - Callback when drawing starts (SignatureOnDrawStartCallback → bool Function(); return true to allow drawing, false to cancel)onDraw - Callback during drawing with offset and timestamp (DrawCallback)onDrawEnd - Callback when drawing ends (VoidCallback)clear() - Clears all strokes from the signature padtoImage({double pixelRatio}) - Converts signature to ui.Image
pixelRatio - Resolution multiplier (default: 1.0, higher = better quality)// Always validate before saving
Future<bool> validateSignature() async {
try {
final image = await _signaturePadKey.currentState!.toImage();
// Check if image has meaningful content
return true;
} catch (e) {
return false; // No signature drawn
}
}
// Use higher pixel ratio for better quality
final image = await _signaturePadKey.currentState!.toImage(
pixelRatio: 3.0, // 3x resolution for high-quality signatures
);
import 'dart:ui' as ui;
import 'dart:typed_data';
Future<Uint8List> getSignatureBytes() async {
final ui.Image image = await _signaturePadKey.currentState!.toImage(
pixelRatio: 3.0,
);
final ByteData? byteData = await image.toByteData(
format: ui.ImageByteFormat.png,
);
return byteData!.buffer.asUint8List();
}
GlobalKey<SfSignaturePadState> to access signature pad methodstoImage() before navigating away to preserve the signaturepixelRatio values produce larger files but better qualityreferences/accessibility.md (opens in a new tab)references/advanced-features.md (opens in a new tab)references/callbacks.md (opens in a new tab)references/customization.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/overview.md (opens in a new tab)references/saving-exporting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-flutter14 skills in this plugin
/syncfusion-flutter-barcode-generatorImplements Syncfusion Flutter Barcode Generator (SfBarcodeGenerator) for generating 1D and 2D barcodes in Flutter apps. Use when working with QR codes, Data Matrix, Code128, EAN, UPC, or other machine-readable barcode formats. This skill covers barcode types, customization, sizing, text display, and integration into product labels, ticketing, or inventory systems./syncfusion-flutter-calendar-datepickerImplements Syncfusion Flutter Calendar (SfCalendar) and Date Range Picker (SfDateRangePicker) widgets for date and scheduling UIs in Flutter apps. Use when building appointment calendars, booking systems, date range selectors, or event scheduling interfaces. This skill covers calendar views, recurring events, date navigation, localization, callbacks, and customization./syncfusion-flutter-cartesian-chartsImplements Syncfusion Flutter Cartesian Charts (SfCartesianChart) for a wide range of 2D chart types in Flutter apps. Use when working with line, column, bar, area, spline, scatter, bubble, financial, stacked, or histogram charts. This skill covers axis types (NumericAxis, CategoryAxis, DateTimeAxis), zoom and pan, tooltip, trackball, legend, annotations, technical indicators, trendlines, and chart export./syncfusion-flutter-chatImplements Syncfusion Flutter Chat (SfChat) and AI AssistView (SfAIAssistView) widgets for conversational interfaces in Flutter apps. Use when building chat UIs, AI chatbot interfaces, or messaging screens with support for message bubbles, composers, and action buttons. This skill covers conversation area customization, placeholder screens, theming, RTL support, and AI assistant integration./syncfusion-flutter-circular-chartsImplements Syncfusion Flutter Circular Charts (SfCircularChart) for pie, doughnut, and radial bar data visualizations in Flutter. Use when working with PieSeries, DoughnutSeries, or RadialBarSeries using the syncfusion_flutter_charts package. This skill covers chart setup, data labels, legends, tooltips, selection, annotations, gradients, animation, accessibility, and chart export./syncfusion-flutter-datagridImplements Syncfusion Flutter DataGrid (SfDataGrid) for displaying and manipulating tabular data in Flutter applications. Use when working with data grids, data tables, or column-based data presentation using the syncfusion_flutter_datagrid package. This skill covers DataGridSource, GridColumn configuration, sorting, filtering, paging, editing, and selection.