NsgSelection constructor
NsgSelection({
- required NsgInputType inputType,
- NsgBaseController? controller,
- Widget rowWidget(
- NsgDataItem,
- bool
- List<
NsgDataItem> ? allValues, - NsgDataItem? selectedElement,
- Color? textColor,
- Color? colorInverted,
- 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;
}