ImagePainter.signature constructor
ImagePainter.signature({
- required Key key,
- Color? signatureBgColor,
- double? height,
- double? width,
- List<
Color> ? colors, - Widget? brushIcon,
- Widget? undoIcon,
- Widget? clearAllIcon,
- Widget? colorIcon,
- ValueChanged<
PaintMode> ? onPaintModeChanged, - ValueChanged<
Color> ? onColorChanged, - ValueChanged<
double> ? onStrokeWidthChanged, - TextDelegate? textDelegate,
- bool? controlsAtTop,
- bool? showControls,
- Color? controlsBackgroundColor,
- Color? selectedColor,
- Color? unselectedColor,
- Color? optionColor,
- VoidCallback? onUndo,
- VoidCallback? onClear,
Constructor for signature painting.
Implementation
factory ImagePainter.signature({
required Key key,
Color? signatureBgColor,
double? height,
double? width,
List<Color>? colors,
Widget? brushIcon,
Widget? undoIcon,
Widget? clearAllIcon,
Widget? colorIcon,
ValueChanged<PaintMode>? onPaintModeChanged,
ValueChanged<Color>? onColorChanged,
ValueChanged<double>? onStrokeWidthChanged,
TextDelegate? textDelegate,
bool? controlsAtTop,
bool? showControls,
Color? controlsBackgroundColor,
Color? selectedColor,
Color? unselectedColor,
Color? optionColor,
VoidCallback? onUndo,
VoidCallback? onClear,
}) {
return ImagePainter._(
key: key,
height: height,
width: width,
isSignature: true,
isScalable: false,
colors: colors,
signatureBackgroundColor: signatureBgColor ?? Colors.white,
brushIcon: brushIcon,
undoIcon: undoIcon,
colorIcon: colorIcon,
clearAllIcon: clearAllIcon,
onPaintModeChanged: onPaintModeChanged,
onColorChanged: onColorChanged,
onStrokeWidthChanged: onStrokeWidthChanged,
textDelegate: textDelegate,
controlsAtTop: controlsAtTop ?? true,
showControls: showControls ?? true,
controlsBackgroundColor: controlsBackgroundColor,
optionSelectedColor: selectedColor,
optionUnselectedColor: unselectedColor,
optionColor: optionColor,
onUndo: onUndo,
onClear: onClear,
);
}