NsgSelection constructor

NsgSelection({
  1. required NsgInputType inputType,
  2. NsgBaseController? controller,
  3. Widget rowWidget(
    1. NsgDataItem,
    2. bool
    )?,
  4. List<NsgDataItem>? allValues,
  5. NsgDataItem? selectedElement,
  6. Color? textColor,
  7. Color? colorInverted,
  8. NsgInputSelectionWidgetType widgetType = NsgInputSelectionWidgetType.column,
})

Implementation

NsgSelection({
  required this.inputType,
  this.controller,
  this.rowWidget,
  this.allValues,
  this.selectedElement,
  this.textColor,
  this.colorInverted,
  this.widgetType = NsgInputSelectionWidgetType.column,
}) {
  if (inputType == NsgInputType.reference) {
    assert(controller != null);
  }
  if (inputType == NsgInputType.enumReference) {
    assert(allValues != null);
    selectionController = _SelectionController();
    selectionController!.status = GetStatus.success(0);
  }
  textColor ??= nsgtheme.colorText;
  colorInverted ??= nsgtheme.colorInverted;
}