USignatureController class
Controls and holds the state of a USignaturePadRaw. Strokes get a velocity-variable width for a natural pen feel, and can be undone, redone, cleared and exported to a PNG.
- Inheritance
-
- Object
- ChangeNotifier
- USignatureController
Constructors
- USignatureController({Color penColor = const Color(0xFF1A1A1A), double minWidth = 1.5, double maxWidth = 4.5, double velocityScale = 1.6})
Properties
- activeStroke → USignatureStroke?
-
no setter
- canRedo → bool
-
no setter
- canUndo → bool
-
no setter
- canvasSize ↔ Size
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isEmpty → bool
-
no setter
- isNotEmpty → bool
-
no setter
- maxWidth ↔ double
-
getter/setter pair
- minWidth ↔ double
-
getter/setter pair
- penColor ↔ Color
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
strokes
→ List<
USignatureStroke> -
no setter
- velocityScale → double
-
Pen velocity (logical px/ms) at which the stroke reaches minWidth.
final
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
beginStroke(
Offset point) → void -
clear(
) → void -
commitStroke(
) → void -
dispose(
) → void -
Discards any resources used by the object.
inherited
-
extendStroke(
Offset point, double speed) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
redo(
) → void -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toPngBytes(
{double pixelRatio = 3, Color? background}) → Future< Uint8List?> -
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited