TitleOption constructor

TitleOption({
  1. required String id,
  2. required String label,
  3. bool locked = false,
  4. String? unlockHint,
})

Implementation

TitleOption({
  required this.id,
  required this.label,
  this.locked = false,
  this.unlockHint,
}) {
  if (id.trim().isEmpty) {
    throw ArgumentError.value(id, 'id', 'must not be blank');
  }
  if (label.trim().isEmpty) {
    throw ArgumentError.value(label, 'label', 'must not be blank');
  }
  if (unlockHint != null && unlockHint!.trim().isEmpty) {
    throw ArgumentError.value(unlockHint, 'unlockHint', 'must not be blank');
  }
}