ImagePainter.signature constructor

ImagePainter.signature({
  1. required Key key,
  2. Color? signatureBgColor,
  3. double? height,
  4. double? width,
  5. List<Color>? colors,
  6. Widget? brushIcon,
  7. Widget? undoIcon,
  8. Widget? clearAllIcon,
  9. Widget? colorIcon,
  10. ValueChanged<PaintMode>? onPaintModeChanged,
  11. ValueChanged<Color>? onColorChanged,
  12. ValueChanged<double>? onStrokeWidthChanged,
  13. TextDelegate? textDelegate,
  14. bool? controlsAtTop,
  15. bool? showControls,
  16. Color? controlsBackgroundColor,
  17. Color? selectedColor,
  18. Color? unselectedColor,
  19. Color? optionColor,
  20. VoidCallback? onUndo,
  21. 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,
  );
}