ImagePainter.memory constructor

ImagePainter.memory(
  1. Uint8List byteArray, {
  2. required Key key,
  3. double? height,
  4. double? width,
  5. bool? scalable,
  6. Widget? placeholderWidget,
  7. List<Color>? colors,
  8. Widget? brushIcon,
  9. Widget? undoIcon,
  10. Widget? clearAllIcon,
  11. Widget? colorIcon,
  12. PaintMode? initialPaintMode,
  13. double? initialStrokeWidth,
  14. Color? initialColor,
  15. ValueChanged<PaintMode>? onPaintModeChanged,
  16. ValueChanged<Color>? onColorChanged,
  17. ValueChanged<double>? onStrokeWidthChanged,
  18. TextDelegate? textDelegate,
  19. bool? controlsAtTop,
  20. bool? showControls,
  21. Color? controlsBackgroundColor,
  22. Color? selectedColor,
  23. Color? unselectedColor,
  24. Color? optionColor,
  25. VoidCallback? onUndo,
  26. VoidCallback? onClear,
})

Constructor for loading image from memory.

Implementation

factory ImagePainter.memory(
  Uint8List byteArray, {
  required Key key,
  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,
  bool? controlsAtTop,
  bool? showControls,
  Color? controlsBackgroundColor,
  Color? selectedColor,
  Color? unselectedColor,
  Color? optionColor,
  VoidCallback? onUndo,
  VoidCallback? onClear,
}) {
  return ImagePainter._(
    key: key,
    byteArray: byteArray,
    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,
    controlsAtTop: controlsAtTop ?? true,
    showControls: showControls ?? true,
    controlsBackgroundColor: controlsBackgroundColor,
    optionSelectedColor: selectedColor,
    optionUnselectedColor: unselectedColor,
    optionColor: optionColor,
    onUndo: onUndo,
    onClear: onClear,
  );
}