FlowElement class

Class to store FlowElements and notify its changes

Inheritance

Constructors

FlowElement({Offset position = Offset.zero, Size size = Size.zero, String text = '', Color textColor = Colors.black, String? fontFamily, double textSize = 24, bool textIsBold = false, ElementKind kind = ElementKind.rectangle, List<Handler> handlers = const [Handler.topCenter, Handler.bottomCenter, Handler.rightCenter, Handler.leftCenter], double handlerSize = 15.0, Color backgroundColor = Colors.white, Color borderColor = Colors.blue, double borderThickness = 3, double elevation = 4, dynamic data, bool isDraggable = true, bool isResizable = false, bool isConnectable = true, bool isDeletable = false, List<ConnectionParams>? next})
FlowElement.fromJson(String source)
factory
FlowElement.fromMap(Map<String, dynamic> map)
factory

Properties

backgroundColor Color
Background color of the element
getter/setter pair
borderColor Color
Border color of the element
getter/setter pair
borderThickness double
Border thickness of the element
getter/setter pair
data → dynamic
Kind-specific data
final
elevation double
Shadow elevation
getter/setter pair
fontFamily String?
Text font family
getter/setter pair
handlers List<Handler>
Connection handlers
getter/setter pair
handlerSize double
The size of element handlers
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
id String
Unique id set when adding a FlowElement with Dashboard.addElement()
getter/setter pair
isConnectable bool
Whether this element can be connected to others
getter/setter pair
isDeletable bool
Whether this element can be deleted quickly by clicking on the trash icon
getter/setter pair
isDraggable bool
Whether this element can be dragged around
getter/setter pair
isEditingText bool
Whether the text of this element is being edited with a form field
getter/setter pair
isResizable bool
Whether this element can be resized
getter/setter pair
kind ElementKind
Element shape
getter/setter pair
next List<ConnectionParams>
List of connections from this element
getter/setter pair
position Offset
The position of the FlowElement
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serializedData String?
Kind-specific data to load/save
getter/setter pair
size Size
The size of the FlowElement
getter/setter pair
text String
Element text
getter/setter pair
textColor Color
Text color
getter/setter pair
textIsBold bool
Makes text bold if true
getter/setter pair
textSize double
Text size
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
changePosition(Offset newPosition) → void
Change element position in the dashboard
changeSize(Size newSize) → void
Change element size
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getHandlerPosition(Alignment alignment) Offset
Get the handler center of this handler for the given alignment.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setBackgroundColor(Color color) → void
Set background color
setBorderColor(Color color) → void
Set border color
setBorderThickness(double thickness) → void
Set border thickness
setElevation(double elevation) → void
Set elevation
setFontFamily(String? fontFamily) → void
Set text font family
setId(String id) → void
Used internally to set an unique Uuid to this element
setScale(double currentZoom, double factor) → void
Sets a new scale
setText(String text) → void
Set text
setTextColor(Color color) → void
Set text color
setTextIsBold(bool isBold) → void
Set text bold
setTextSize(double size) → void
Set text size
toJson() String
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(covariant FlowElement other) bool
The equality operator.
override