SignatureControllerIns class
- Inheritance
-
- Implemented types
-
Properties
-
canRedo
→ bool
-
check if there is any action to redo
no setterinherited
-
canUndo
→ bool
-
check if there is any action to undo
no setterinherited
-
defaultHeight
→ int?
-
Calculates a default height based on existing points.
Will return
null if there are no points.
no setterinherited
-
defaultWidth
→ int?
-
Calculates a default width based on existing points.
Will return
null if there are no points.
no setterinherited
-
disabled
↔ bool
-
If set to true canvas writting will be disabled.
getter/setter pairinherited
-
exportBackgroundColor
→ Color?
-
background color to be used in exported png image
finalinherited
-
exportPenColor
→ Color?
-
color of a ginature line to be used in exported png image
finalinherited
-
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 setterinherited
-
isNotEmpty
→ bool
-
check if canvas is not empty (opposite of isEmpty method for convenience)
no setterinherited
-
maxXValue
→ double?
-
The biggest x value for all points.
Will return
null if there are no points.
no setterinherited
-
maxYValue
→ double?
-
The biggest y value for all points.
Will return
null if there are no points.
no setterinherited
-
minXValue
→ double?
-
The smallest x value for all points.
Will return
null if there are no points.
no setterinherited
-
minYValue
→ double?
-
The smallest y value for all points.
Will return
null if there are no points.
no setterinherited
-
onDrawEnd
↔ VoidCallback?
-
callback to notify when drawing has stopped
getter/setter pairinherited
-
onDrawMove
↔ VoidCallback?
-
callback to notify when the pointer was moved while drawing.
getter/setter pairinherited
-
onDrawStart
↔ VoidCallback?
-
callback to notify when drawing has started
getter/setter pairinherited
-
penColor
→ Color
-
color of a signature line
finalinherited
-
penStrokeWidth
→ double
-
boldness of a signature line
finalinherited
-
points
↔ List<Point>
-
getter for points representing signature on 2D canvas
getter/setter pairinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
strokeCap
→ StrokeCap
-
shape of line ends
finalinherited
-
strokeJoin
→ StrokeJoin
-
shape of line joins
finalinherited
-
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
inherited
-
clear()
→ void
-
Clear the canvas
inherited
-
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
-
get(Token name)
→ Object?
-
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners()
→ void
-
Call all the registered listeners.
inherited
-
pointsToStrokes(double minDistanceBetweenPoints)
→ List<List<Point>>
-
Helper method to convert points to strokes
inherited
-
pushCurrentStateToUndoStack()
→ void
-
REMEMBERS CURRENT CANVAS STATE IN UNDO STACK
inherited
-
redo()
→ void
-
It will remove last reverted actions and add it into
_latestActions
Then, it will modify the real points with the last reverted action.
inherited
-
removeListener(VoidCallback listener)
→ void
-
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
set(Token name, Object? value)
→ void
-
override
-
toImage({int? width, int? height})
→ Future<Image?>
-
Convert to an ui.Image.
Will return
null if there are no points.
inherited
-
toPngBytes({int? height, int? width})
→ Future<Uint8List?>
-
convert canvas to dart:ui ui.Image and then to PNG represented in Uint8List
height and width should be at least as big as the drawings size
Will return
null if there are no points.
inherited
-
toRawSVG({int? width, int? height, double minDistanceBetweenPoints = 3})
→ String?
-
Export the current content to a raw SVG string.
Will return
null if there are no points.
width Canvas width to use
height Canvas height to use
minDistanceBetweenPoints Minimal distance between points to be included in svg. Used to reduce svg output size.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
toSVG({int? width, int? height, double minDistanceBetweenPoints = 3})
→ SvgPicture?
-
Export the current content to a SVG graphic.
Will return
null if there are no points.
width Canvas width to use
height Canvas height to use
minDistanceBetweenPoints Minimal distance between points to be included in svg. Used to reduce svg output size.
inherited
-
undo()
→ void
-
It will remove last action from
_latestActions.
The last action will be saved to _revertedActions
that will be used to do redo-ing.
Then, it will modify the real points with the last action.
inherited