NsgInput class

Inheritance
Available extensions

Constructors

NsgInput.new({Key? key, List<String>? countryCodes, String? countryCodeInitial, Widget? child, List dynamicList = const [], NsgSwitchHorizontalStyle nsgSwitchHorizontalStyle = const NsgSwitchHorizontalStyle(), Color? trackColor, NsgInputSelectionWidgetType selectionWidgetType = NsgInputSelectionWidgetType.column, Color? activeColor, Color? thumbColor, bool autofocus = false, DateTime? initialDateTime, DateTime? firstDateTime, DateTime? lastDateTime, KeyEventResult onKeyEvent(FocusNode focus, KeyEvent event)?, int? maxLenght, String validateText = '', TextAlign textAlign = TextAlign.left, required NsgDataItem dataItem, required String fieldName, bool showDeleteIcon = true, bool? showLabel, NsgDataController<NsgDataItem>? controller, NsgBaseController? selectionController, NsgDataController<NsgDataItem>? updateController, String label = '', Color? labelColor, List<String>? imagesList, bool disabled = false, double? fontSize, double borderRadius = 15, EdgeInsets? margin, bool? gesture, String? hint, dynamic onChanged(NsgDataItem)?, dynamic onFocusChanged(bool value)?, VoidCallback? onPressed, dynamic onEditingComplete(NsgDataItem, String)?, dynamic onFieldSubmitted(NsgDataItem, String)?, int maxLines = 1, int minLines = 1, Widget? widget, Widget rowWidget(NsgDataItem, bool)?, NsgInputType inputType = NsgInputType.autoselect, String selectionForm = '', TextInputType? keyboard = TextInputType.text, String? mask, NsgInputMaskType? maskType, List<NsgDataItem>? itemsToSelect, bool? required, TextFormFieldType? textFormFieldType, Color? borderColor, bool? filled, Color? filledColor, bool? isDense, Widget? labelWidget, bool showLock = true, FloatingLabelBehavior? floatingLabelBehavior = FloatingLabelBehavior.never, TextStyle? textStyle, Widget? boolWidget, BoolBoxPosition? boolBoxPosition = BoolBoxPosition.end, EdgeInsets? contentPadding, Widget? prefix, Widget? suffixIcon, String? formatDateTime, NsgDataRequestParams getRequestFilter()?, TextCapitalization textCapitalization = TextCapitalization.none, bool autocorrect = true})
const

Properties

activeColor Color?
final
autocorrect bool
Режим автозамены. Вкл/Выкл
final
autofocus bool
Автовокус на поле при входе на страницу
final
boolBoxPosition BoolBoxPosition?
Положение bool элемента относително label или labelWidget
final
boolWidget Widget?
Заменяет дефолтный виджет для bool значений на кастомный
final
borderColor Color?
Цвет границ поля ввода
final
borderRadius double
final
child Widget?
Виджет для Bool переключателя, если нужно что-то сложнее простой текстовой строки
final
contentPadding EdgeInsets?
Параметры отступа для значений внутри NsgInput
final
controller → NsgDataController<NsgDataItem>?
Контроллер
final
countryCodeInitial String?
Дефолтный выбранный код страны, например: 'en'
final
countryCodes List<String>?
Список кодов стран при выборе кода телефонного номера страны, например: 'en','ru'
final
dataItem → NsgDataItem
Объект, значение поля которого отображается
final
disabled bool
final
dynamicList List
final
fieldName String
Поле для отображения и задания значения
final
filled bool?
Закрашивать ли поле цветом
final
filledColor Color?
Цвет окрашивания поля
final
firstDateTime DateTime?
Самая ранняя дата, доступная для выбора
final
floatingLabelBehavior FloatingLabelBehavior?
Поведение label при вводе контента
final
fontSize double?
final
formatDateTime String?
Форматировать отображение времени для входящего виджета
final
gesture bool?
final
getRequestFilter → NsgDataRequestParams Function()?
final
hashCode int
The hash code for this object.
no setterinherited
hint String?
final
imagesList List<String>?
Высота Картинки для выводя рядом с текстом
final
initialDateTime DateTime?
Дата с которой будет предложен выбор, если поле равно 0г. или 1754г.
final
inputType NsgInputType
Тип поля ввода. Если тип не задан (NsgInputType.autoselect), он будет выбран автоматически, исходя из типа данных поля объекта
final
isDense bool?
Поджимать поле по высоте (встроенный параметр в textForField)
final
itemsToSelect List<NsgDataItem>?
При работе с enum можно задать возможные варианты для выбора, если не заданы, будут предложены все
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboard TextInputType?
Тип клавиатуры
final
label String
final
labelColor Color?
final
labelWidget Widget?
Виджет для отображения в поле ввода как подсказка
final
lastDateTime DateTime?
Самая поздняя дата, доступная для выбора
final
margin EdgeInsets?
final
mask String?
Маска текста
final
maskType NsgInputMaskType?
Поле с телефоном и специальной маской для телефонов разных стран Поле с российским номером автомобиля и автокорректировкой символов
final
maxLenght int?
Максимальное количество символов
final
maxLines int
final
minLines int
final
nsgSwitchHorizontalStyle NsgSwitchHorizontalStyle
final
onChanged → dynamic Function(NsgDataItem)?
final
onEditingComplete → dynamic Function(NsgDataItem, String)?
final
onFieldSubmitted → dynamic Function(NsgDataItem, String)?
final
onFocusChanged → dynamic Function(bool value)?
final
onKeyEvent KeyEventResult Function(FocusNode focus, KeyEvent event)?
Для обработки нажатия на физические кнопки при нахождении в фокусе
final
onPressed → VoidCallback?
final
prefix Widget?
Виджет для отображения в начале NsgInput
final
required bool?
Обязательное поле (будет помечено звездочкой)
final
rowWidget Widget Function(NsgDataItem, bool)?
Функция прорисовки строки
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionController → NsgBaseController?
Контроллер для выбора связанного значения
final
selectionForm String
В случае задания формы для подбора значений для ссылочный полей, вместо стандартной формы будет выполнен переход на данную форму в режиме контроллера выбор значения
final
selectionWidgetType NsgInputSelectionWidgetType
Внешний вид отображение Selection (колонка или грид)
final
showDeleteIcon bool
Показывать иконку удаления
final
showLabel bool?
Показывать label
final
showLock bool
Показывать значек замка при параметре disabled
final
suffixIcon Widget?
Иконка для отображения в конце NsgInput
final
textAlign TextAlign
Выравнивание текста
final
textCapitalization TextCapitalization
Стандартные правила автопростановки заглавных букв при вводе текста Просто транслируется в FormTextField и работает по стандартной логике
final
textFormFieldType TextFormFieldType?
Тип поля ввода
final
textStyle TextStyle?
Стиль текста в поле ввода
final
thumbColor Color?
final
trackColor Color?
final
updateController → NsgDataController<NsgDataItem>?
Контроллер, которому будет подаваться update при изменении значения в Input
final
validateText String
Красный текст валидации под текстовым полем
final
widget Widget?
final

Methods

asGlass({double blurX = 10.0, double blurY = 10.0, Color tintColor = Colors.white, bool frosted = true, BorderRadius clipBorderRadius = BorderRadius.zero, Clip clipBehaviour = Clip.antiAlias, TileMode tileMode = TileMode.clamp, CustomClipper<RRect>? clipper}) ClipRRect

Available on T, provided by the NsgGlassWidget extension

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<NsgInput>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
selectInputType() NsgInputType
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited