ImageSketcher class
ImageSketcher widget.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ImageSketcher
- Annotations
Constructors
-
ImageSketcher.asset(String path, {required Key key, bool enableToolbar = true, Color? toolbarBGColor, bool enableControlMode = true, bool enableColorSelection = true, bool enableBrush = true, bool enableText = true, bool enableUndo = true, bool enableClear = true, List<
Widget> customToolItems = const [], double? height, double? width, bool? scalable, Widget? placeholderWidget, List<Color> ? colors, Widget? brushIcon, Widget? undoIcon, Widget? clearAllIcon, Widget? colorIcon, PaintMode? initialPaintMode, double? initialStrokeWidth, Color? initialColor, ValueChanged<PaintMode> ? onPaintModeChanged, ValueChanged<Color> ? onColorChanged, ValueChanged<double> ? onStrokeWidthChanged, TextDelegate? textDelegate, AlignmentGeometry controlPosition = Alignment.topCenter, bool isControllerOverlay = false, ControllerAxis controllerAxis = ControllerAxis.vertical, BoxDecoration? controllerDecoration, double? controllerHeight, double? controllerWidth, EdgeInsetsGeometry? controllerPadding, EdgeInsetsGeometry? controllerMargin}) -
Constructor for loading image from assetPath.
factory
-
ImageSketcher.file(File file, {required Key key, bool enableToolbar = true, Color? toolbarBGColor, bool enableControlMode = true, bool enableColorSelection = true, bool enableBrush = true, bool enableText = true, bool enableUndo = true, bool enableClear = true, List<
Widget> customToolItems = const [], double? height, double? width, bool? scalable, Widget? placeholderWidget, List<Color> ? colors, Widget? brushIcon, Widget? undoIcon, Widget? clearAllIcon, Widget? colorIcon, PaintMode? initialPaintMode, double? initialStrokeWidth, Color? initialColor, ValueChanged<PaintMode> ? onPaintModeChanged, ValueChanged<Color> ? onColorChanged, ValueChanged<double> ? onStrokeWidthChanged, TextDelegate? textDelegate, AlignmentGeometry controlPosition = Alignment.topCenter, bool isControllerOverlay = false, ControllerAxis controllerAxis = ControllerAxis.vertical, BoxDecoration? controllerDecoration, double? controllerHeight, double? controllerWidth, EdgeInsetsGeometry? controllerPadding, EdgeInsetsGeometry? controllerMargin}) -
Constructor for loading image from File.
factory
-
ImageSketcher.memory(Uint8List byteArray, {required Key key, bool enableToolbar = true, Color? toolbarBGColor, bool enableControlMode = true, bool enableColorSelection = true, bool enableBrush = true, bool enableText = true, bool enableUndo = true, bool enableClear = true, List<
Widget> customToolItems = const [], double? height, double? width, bool? scalable, Widget? placeholderWidget, List<Color> ? colors, Widget? brushIcon, Widget? undoIcon, Widget? clearAllIcon, Widget? colorIcon, PaintMode? initialPaintMode, double? initialStrokeWidth, Color? initialColor, ValueChanged<PaintMode> ? onPaintModeChanged, ValueChanged<Color> ? onColorChanged, ValueChanged<double> ? onStrokeWidthChanged, TextDelegate? textDelegate, AlignmentGeometry controlPosition = Alignment.topCenter, bool isControllerOverlay = false, ControllerAxis controllerAxis = ControllerAxis.vertical, BoxDecoration? controllerDecoration, double? controllerHeight, double? controllerWidth, EdgeInsetsGeometry? controllerPadding, EdgeInsetsGeometry? controllerMargin}) -
Constructor for loading image from memory.
factory
-
ImageSketcher.network(String url, {required Key key, bool enableToolbar = true, Color? toolbarBGColor, bool enableControlMode = true, bool enableColorSelection = true, bool enableBrush = true, bool enableText = true, bool enableUndo = true, bool enableClear = true, List<
Widget> customToolItems = const [], double? height, double? width, Widget? placeholderWidget, bool? scalable, List<Color> ? colors, Widget? brushIcon, Widget? undoIcon, Widget? clearAllIcon, Widget? colorIcon, PaintMode? initialPaintMode, double? initialStrokeWidth, Color? initialColor, ValueChanged<PaintMode> ? onPaintModeChanged, ValueChanged<Color> ? onColorChanged, ValueChanged<double> ? onStrokeWidthChanged, TextDelegate? textDelegate, AlignmentGeometry controlPosition = Alignment.topCenter, bool isControllerOverlay = false, ControllerAxis controllerAxis = ControllerAxis.vertical, BoxDecoration? controllerDecoration, double? controllerHeight, double? controllerWidth, EdgeInsetsGeometry? controllerPadding, EdgeInsetsGeometry? controllerMargin}) -
Constructor for loading image from network url.
factory
-
ImageSketcher.signature({required Key key, Color? signatureBgColor, double? height, double? width, List<
Color> ? colors, Widget? brushIcon, Widget? undoIcon, Widget? clearAllIcon, Widget? colorIcon, ValueChanged<PaintMode> ? onPaintModeChanged, ValueChanged<Color> ? onColorChanged, ValueChanged<double> ? onStrokeWidthChanged, TextDelegate? textDelegate}) -
Constructor for signature painting.
factory
Properties
- assetPath → String?
-
Only accessible through
ImagePainter.asset
constructor.final - brushIcon → Widget?
-
Icon Widget of strokeWidth.
final
- byteArray → Uint8List?
-
Only accessible through
ImagePainter.memory
constructor.final - clearAllIcon → Widget?
-
Widget for clearing all actions on control bar.
final
- colorIcon → Widget?
-
Widget of Color Icon in control bar.
final
-
colors
→ List<
Color> ? -
List of colors for color selection
If not provided, default colors are used.
final
- controllerAxis → ControllerAxis
-
Control position.
final
- controllerDecoration → BoxDecoration?
-
Control position.
final
- controllerHeight → double?
-
Control height.
final
- controllerMargin → EdgeInsetsGeometry?
-
Control width.
final
- controllerPadding → EdgeInsetsGeometry?
-
Control width.
final
- controllerPosition → AlignmentGeometry
-
Control position.
final
- controllerWidth → double?
-
Control width.
final
-
customToolItems
→ List<
Widget> -
Custom toolbar item widgets
final
- enableBrush → bool
-
Enable/Disable Brush
final
- enableClear → bool
-
Enable/Disable Clear
final
- enableColorSelection → bool
-
Enable/Disable Color Selection
final
- enableControlMode → bool
-
Enable/Disable Control Mode
final
- enableText → bool
-
Enable/Disable Text
final
- enableToolbar → bool
-
Toolbar background color
final
- enableUndo → bool
-
Enable/Disable Undo
final
- file → File?
-
Only accessible through ImageSketcher.file constructor.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Height of the Widget. Image is subjected to fit within the given height.
final
- initialColor → Color?
-
final
- initialPaintMode → PaintMode?
-
Initial PaintMode.
final
- initialStrokeWidth → double?
-
final
- isControllerOverlay → bool
-
Control position.
final
- isScalable → bool?
-
Defines whether the widget should be scaled or not. Defaults to
false
.final - isSignature → bool
-
Flag to determine signature or image;
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- networkUrl → String?
-
Only accessible through
ImagePainter.network
constructor.final -
onColorChanged
→ ValueChanged<
Color> ? -
final
-
onPaintModeChanged
→ ValueChanged<
PaintMode> ? -
final
-
onStrokeWidthChanged
→ ValueChanged<
double> ? -
final
- placeHolder → Widget?
-
Widget to be shown during the conversion of provided image to ui.Image.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signatureBackgroundColor → Color?
-
Signature mode background color
final
- textDelegate → TextDelegate?
-
final
- toolbarBGColor → Color?
-
Toolbar background color
final
- undoIcon → Widget?
-
Widget for Undo last action on control bar.
final
- width → double?
-
Width of the widget. Image is subjected to fit within the given width.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ImageSketcherState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited