SignatureController class

class for interaction with signature widget manages points representing signature on canvas provides signature manipulation functions (export, clear)

Inheritance

Constructors

SignatureController({List<Point>? points, Color penColor = Colors.black, double penStrokeWidth = 3.0, Color? exportBackgroundColor, VoidCallback? onDrawStart, VoidCallback? onDrawEnd})
constructor

Properties

exportBackgroundColor Color?
background color to be used in exported png image
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isEmpty bool
check if canvas is empty (opposite of isNotEmpty method for convenience)
no setter
isNotEmpty bool
check if canvas is not empty (opposite of isEmpty method for convenience)
no setter
onDrawEnd VoidCallback?
callback to notify when drawing has stopped
getter/setter pair
onDrawStart VoidCallback?
callback to notify when drawing has started
getter/setter pair
penColor Color
color of a signature line
final
penStrokeWidth double
boldness of a signature line
final
points List<Point>
getter for points representing signature on 2D canvas
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value List<Point>
The current value stored in this notifier.
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addPoint(Point point) → void
add point to point collection
clear() → void
clear the canvas
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toImage() Future<Image?>
convert to
toPngBytes() Future<Uint8List?>
convert canvas to dart:ui Image and then to PNG represented in Uint8List
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited