ImageSketcher.network constructor

ImageSketcher.network(
  1. String url, {
  2. required Key key,
  3. bool enableToolbar = true,
  4. Color? toolbarBGColor,
  5. bool enableControlMode = true,
  6. bool enableColorSelection = true,
  7. bool enableBrush = true,
  8. bool enableText = true,
  9. bool enableUndo = true,
  10. bool enableClear = true,
  11. List<Widget> customToolItems = const [],
  12. double? height,
  13. double? width,
  14. Widget? placeholderWidget,
  15. bool? scalable,
  16. List<Color>? colors,
  17. Widget? brushIcon,
  18. Widget? undoIcon,
  19. Widget? clearAllIcon,
  20. Widget? colorIcon,
  21. PaintMode? initialPaintMode,
  22. double? initialStrokeWidth,
  23. Color? initialColor,
  24. ValueChanged<PaintMode>? onPaintModeChanged,
  25. ValueChanged<Color>? onColorChanged,
  26. ValueChanged<double>? onStrokeWidthChanged,
  27. TextDelegate? textDelegate,
  28. AlignmentGeometry controlPosition = Alignment.topCenter,
  29. bool isControllerOverlay = false,
  30. ControllerAxis controllerAxis = ControllerAxis.vertical,
  31. BoxDecoration? controllerDecoration,
  32. double? controllerHeight,
  33. double? controllerWidth,
  34. EdgeInsetsGeometry? controllerPadding,
  35. EdgeInsetsGeometry? controllerMargin,
})

Constructor for loading image from network url.

Implementation

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,
}) {
  return ImageSketcher._(
    key: key,
    networkUrl: url,
    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,
    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,
  );
}