FlowElement class

Class to store ElementWidgets and notify its changes

Inheritance

Constructors

FlowElement({dynamic 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 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
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
isResizing bool
Element text
getter/setter pair
kind ElementKind
Element shape
getter/setter pair
next List<ConnectionParams>
List of connections of 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
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) → dynamic
Change element position in the dashboard
changeSize(Size newSize) → dynamic
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
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) → dynamic
Set background color
setBorderColor(Color color) → dynamic
Set border color
setBorderThickness(double thickness) → dynamic
Set border thickness
setElevation(double elevation) → dynamic
Set elevation
setFontFamily(String? fontFamily) → dynamic
Set text font family
setId(String id) → dynamic
Used internally to set an unique Uuid to this element
setIsResizing(bool resizing) → dynamic
When setting to true, a handler will disply at the element bottom right to let the user to resize it. When finish it will disappear.
setScale(double currentZoom, double factor) → dynamic
setText(String text) → dynamic
Set text
setTextColor(Color color) → dynamic
Set text color
setTextIsBold(bool isBold) → dynamic
Set text bold
setTextSize(double size) → dynamic
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