FabricController class
- Mixed-in types
Constructors
- FabricController({Color backgroundColor = Colors.white, bool selection = true, bool isDrawingMode = false, BaseBrush? freeDrawingBrush, ImageResolver? onResolveImage})
Properties
- activeFillColor ↔ Color
-
getter/setter pair
- activeFontSize ↔ double
-
getter/setter pair
- activeObject → FabricObject?
-
no setter
-
activeObjects
→ List<
FabricObject> -
no setter
- activeStrokeColor ↔ Color
-
getter/setter pair
- activeStrokeWidth ↔ double
-
getter/setter pair
- backgroundColor ↔ Color
-
getter/setter pair
- backgroundImage ↔ Image?
-
getter/setter pair
- canRedo → bool
-
no setter
- canUndo → bool
-
no setter
- editingTextObject ↔ FabricIText?
-
getter/setter pair
- freeDrawingBrush ↔ BaseBrush?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- interactionMode ↔ FabricInteractionMode
-
Switches the active interaction mode and keeps isDrawingMode in sync.
getter/setter pair
- isDrawingMode ↔ bool
-
getter/setter pair
-
objects
→ List<
FabricObject> -
no setter
- onObjectAdded ↔ FabricObjectCallback?
-
getter/setter pair
- onObjectModified ↔ FabricObjectCallback?
-
getter/setter pair
- onObjectRemoved ↔ FabricObjectCallback?
-
getter/setter pair
- onRender ↔ VoidCallback?
-
getter/setter pair
- onResolveImage → ImageResolver?
-
final
- onSelectionCleared ↔ FabricSelectionCallback?
-
getter/setter pair
- onSelectionCreated ↔ FabricSelectionCallback?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection ↔ bool
-
getter/setter pair
- viewportTransform → Offset
-
no setter
- zoom → double
-
no setter
Methods
-
add(
FabricObject obj) → void -
addAll(
List< FabricObject> objects) → void -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addToActiveObjects(
FabricObject obj) → void -
alignBottom(
) → void -
alignCenterH(
) → void -
alignCenterV(
) → void -
alignLeft(
) → void -
alignRight(
) → void -
alignTop(
) → void -
bringForward(
FabricObject obj) → void -
bringToFront(
FabricObject obj) → void -
clear(
) → void -
copyActiveObjects(
) → void -
cutActiveObjects(
) → void -
discardActiveObject(
) → void -
dispose(
) → void -
Discards any resources used by the object.
override
-
distributeHorizontally(
) → void -
distributeVertically(
) → void -
exportPng(
{Size? size, double pixelRatio = 2.0}) → Future< Uint8List?> -
Exports the canvas to PNG bytes at
pixelRatioresolution. -
findObjectAtPoint(
Offset point) → FabricObject? -
flipActiveObjectsX(
) → void -
flipActiveObjectsY(
) → void -
groupActiveObjects(
) → FabricGroup? -
loadFromJson(
String json) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
panBy(
Offset delta) → void -
pasteObjects(
) → void -
redo(
) → void -
remove(
FabricObject obj) → void -
removeActiveObjects(
) → void -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
requestRepaint(
) → void - Triggers a canvas repaint without a state change — used by FabricCanvas during free-drawing to keep strokes visible in real time.
-
resetViewport(
) → void -
selectAll(
) → void -
sendBackward(
FabricObject obj) → void -
sendToBack(
FabricObject obj) → void -
setActiveObject(
FabricObject obj) → void -
setActiveObjects(
List< FabricObject> objects) → void -
startEditingText(
FabricIText text) → void -
toImage(
Size logicalSize) → Future< Image> -
toJson(
) → String -
toString(
) → String -
A string representation of this object.
inherited
-
toSvg(
{double width = 800, double height = 600}) → String -
undo(
) → void -
ungroup(
FabricGroup group) → List< FabricObject> -
zoomTo(
double zoom) → void -
zoomToPoint(
Offset point, double zoom) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited