ImageSketcher.memory constructor
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.
Implementation
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,
}) {
return ImageSketcher._(
key: key,
byteArray: byteArray,
enableToolbar: enableToolbar,
toolbarBGColor: toolbarBGColor,
enableControlMode: enableControlMode,
enableColorSelection: enableColorSelection,
enableBrush: enableBrush,
enableText: enableText,
enableUndo: enableUndo,
enableClear: enableClear,
customToolItems: customToolItems,
height: height,
width: width,
placeHolder: placeholderWidget,
isScalable: scalable ?? false,
colors: colors,
brushIcon: brushIcon,
undoIcon: undoIcon,
colorIcon: colorIcon,
clearAllIcon: clearAllIcon,
initialPaintMode: initialPaintMode,
initialColor: initialColor,
initialStrokeWidth: initialStrokeWidth,
onPaintModeChanged: onPaintModeChanged,
onColorChanged: onColorChanged,
onStrokeWidthChanged: onStrokeWidthChanged,
textDelegate: textDelegate,
controllerPosition: controlPosition,
isControllerOverlay: isControllerOverlay,
controllerAxis: controllerAxis,
controllerDecoration: controllerDecoration,
controllerHeight: controllerHeight,
controllerWidth: controllerWidth,
controllerPadding: controllerPadding,
controllerMargin: controllerMargin,
);
}