arch property
ComponentDefinition<Arch3DComponent>
get
arch
Implementation
static ComponentDefinition<Arch3DComponent>
get arch => _definition<Arch3DComponent>(
type: 'Arch3DComponent',
id: 'arch_3d_a19df39b',
create: Arch3DComponent.new,
name: 'Arch',
description:
'A curved band standing up: an arch, a bridge, part of a ring.',
icon: Icons.architecture,
size: [
_size<Arch3DComponent>('radius', (c) => c.radius, (c, v) => c.radius = v),
_size<Arch3DComponent>(
'thickness',
(c) => c.thickness,
(c, v) => c.thickness = v,
),
_size<Arch3DComponent>('depth', (c) => c.depth, (c, v) => c.depth = v),
FieldDefinition(
name: 'angle',
kind: FieldTypes.decimal,
read: (c) => (c as Arch3DComponent).angle,
write: (c, v) => (c as Arch3DComponent).angle = (v as num).toDouble(),
min: 0.01,
max: 2 * math.pi,
),
],
detail: [
_count<Arch3DComponent>(
'segments',
(c) => c.segments,
(c, v) => c.segments = v,
1,
128,
),
_flag<Arch3DComponent>('smooth', (c) => c.smooth, (c, v) => c.smooth = v),
],
hints: const {
'radius': FieldHint(
label: 'Radius',
description: 'Its outside radius.',
scrub: ScrubHint(step: 0.05, fractionDigits: 2, suffix: 'm'),
),
'angle': FieldHint(
label: 'Angle',
description: 'How much of a ring it is: 180° stands on two feet.',
unit: AngleUnit.degrees,
scrub: ScrubHint(step: 1, fractionDigits: 0, suffix: '°'),
),
},
);