CanvasElement class
A class representing an editable item.
An editable item can be a text or an image that can be manipulated by the user. It has several properties that define its state, such as position, scale, rotation, type, value, color, textStyle, fontSize, and fontFamily.
Constructors
- CanvasElement()
-
CanvasElement.fromJson({required Map<
String, dynamic> json, required List<String> fontFamilyList, required List<List< textDecorationColorList})Color> > -
factory
Properties
- fontFamily ↔ int
-
The font family of the text.
getter/setter pair
- fontSize ↔ double
-
The font size of the text.
getter/setter pair
- giphyImage ↔ GiphyGif?
-
The giphyImage for GIF.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- position ↔ Offset
-
The position of the item on the screen.
getter/setter pair
- rotation ↔ double
-
The rotation of the item.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale ↔ double
-
The scale of the item.
getter/setter pair
- textColor ↔ Color
-
The color of the item.
getter/setter pair
- textDecorationColor ↔ int
-
The style of the text.
getter/setter pair
- type ↔ ItemType
-
The type of the item.
getter/setter pair
- value ↔ String
-
The value of the item.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
{required String fontFamilyValue, required List< Color> fontBackgroundColorValue}) → Map<String, dynamic> - Returns information about all widgets in design.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited