setDocumentLabelLeaf function

VenueLayoutDocument setDocumentLabelLeaf(
  1. VenueLayoutDocument document,
  2. String field, {
  3. Object? value,
  4. bool unset = false,
})

Implementation

VenueLayoutDocument setDocumentLabelLeaf(
  VenueLayoutDocument document,
  String field, {
  Object? value,
  bool unset = false,
}) {
  final next = patchCanonicalStyle(
    {'label': document.styles['label'] ?? {}},
    ['label', field],
    value: value,
    unset: unset,
  );
  return document.copyWith(
    styles: {...document.styles, 'label': next['label'] ?? {}},
  );
}