TiledObject class

Below is Tiled's documentation about how this structure is represented on XML files:

Constructors

TiledObject({required int id, String name = '', String type = '', int? gid, double x = 0, double y = 0, double width = 0, double height = 0, double rotation = 0, bool ellipse = false, bool point = false, bool rectangle = false, Template? template, Text? text, bool visible = true, List<Point> polygon = const [], List<Point> polyline = const [], CustomProperties properties = CustomProperties.empty})
TiledObject.parse(Parser parser)
factory

Properties

class_ String
The "Class" property, a.k.a "Type" prior to Tiled 1.9. Will be same as type.
no setter
ellipse bool
getter/setter pair
gid int?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double
getter/setter pair
id int
getter/setter pair
isEllipse bool
no setter
isPoint bool
no setter
isPolygon bool
no setter
isPolyline bool
no setter
isRectangle bool
no setter
name String
getter/setter pair
point bool
getter/setter pair
polygon List<Point>
getter/setter pair
polyline List<Point>
getter/setter pair
properties CustomProperties
getter/setter pair
rectangle bool
getter/setter pair
rotation double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
template Template?
getter/setter pair
text Text?
getter/setter pair
type String
getter/setter pair
visible bool
getter/setter pair
width double
getter/setter pair
x double
getter/setter pair
y double
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parsePointList(Parser parser, String name) List<Point>