SignatureController class Null safety

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. [...]
read-only, inherited
hasListeners bool
Whether any listeners are currently registered. [...]
@protected, read-only, inherited
isEmpty bool
check if canvas is empty (opposite of isNotEmpty method for convenience)
read-only
isNotEmpty bool
check if canvas is not empty (opposite of isEmpty method for convenience)
read-only
onDrawEnd VoidCallback?
callback to notify when drawing has stopped
read / write
onDrawStart VoidCallback?
callback to notify when drawing has started
read / write
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
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value List<Point>
The current value stored in this notifier. [...]
read / write, inherited

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 and removeListener will throw after the object is disposed). [...]
@mustCallSuper, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notifyListeners() → void
Call all the registered listeners. [...]
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