defaultOffering method

OfferingModel? defaultOffering()

Returns the offering marked as the server default.

This retains the historical firstWhere behavior: a non-null offering list without a default entry throws StateError.

Implementation

OfferingModel? defaultOffering() {
  return offerings?.firstWhere((offering) => offering.isDefault ?? false);
}