polygon property
ComponentSchema<Polygon3D>
get
polygon
Implementation
static ComponentSchema<Polygon3D> get polygon => _schema<Polygon3D>(
type: 'Polygon3D',
id: 'polygon_3d_54238989',
create: Polygon3D.new,
name: 'Polygon',
description: 'An outline on the ground, raised to a height.',
icon: Icons.hexagon_outlined,
size: [
SchemaField(
name: 'points',
kind: FieldTypes.offsetList,
read: (c) => (c as Polygon3D).points,
write: (c, v) =>
(c as Polygon3D).points = (v as List).cast<Offset>().toList(),
),
_size<Polygon3D>('height', (c) => c.height, (c, v) => c.height = v),
],
hints: const {
'points': FieldHint(
label: 'Points',
description: 'Its corners, in order round it: x and z on the ground.',
),
},
);