SeatingChartConfig constructor

SeatingChartConfig([
  1. void updates(
    1. SeatingChartConfigBuilder
    )?
])

Implementation

factory SeatingChartConfig([void Function(SeatingChartConfigBuilder)? updates]) {
  final instance = _$SeatingChartConfig(updates ?? (b) {});

  if (instance.workspaceKey.isEmpty) {
    throw ArgumentError('workspaceKey is required and cannot be empty.');
  }
  if ((instance.event?.isEmpty ?? true) == (instance.events?.isEmpty ?? true)) {
    throw ArgumentError(
      'Either "event" or "events" must be provided, but not both.',
    );
  }

  return instance;
}