DrawingPadController constructor
DrawingPadController({
- bool? usePerfectFreehand,
- GlobalKey<
State< ? canvasKey,StatefulWidget> > - Color? backgroundColor,
Initializes a new instance of the DrawingPadController class.
usePerfectFreehand determines whether to use the perfect_freehand package.
Implementation
DrawingPadController({
bool? usePerfectFreehand,
GlobalKey? canvasKey,
Color? backgroundColor,
}) {
this.canvasKey = canvasKey ?? GlobalKey();
this.backgroundColor = backgroundColor ?? Colors.white;
if (usePerfectFreehand != null) {
this.usePerfectFreehand = usePerfectFreehand;
}
undoRedoStack = UndoRedoStack(
strokesNotifier: strokesListenable,
currentStrokeNotifier: currentStrokeListenable,
);
}