select method
Implementation
Future<void> select(int value) async {
index = value;
if (widget.items.isEmpty) return;
final UArTryOnItem item = widget.items[index];
try {
await controller.removeNode("tryon");
await controller.addNode(
UArNode.model(
id: "tryon",
source: item.source,
iosSource: item.iosSource,
anchorId: "face",
position: item.position,
rotation: item.rotation,
scale: item.scale,
fitSize: item.fitSize,
pivot: UArPivot.center,
castShadow: false,
hittable: false,
),
);
} catch (_) {}
if (mounted) setState(() {});
}