Map<String, dynamic> toWire() => { 'id': stableId, 'visible': visible, if (visibleFraction != null) 'visible_fraction': visibleFraction, };