Documentation Index
Fetch the complete documentation index at: https://synapsync.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Text Input Components
Nebux provides form-integrated text input widgets with comprehensive validation and state management.NbxTextFormFieldWidget
A text input widget that integrates with Flutter’s Form system for validation.Basic Usage
NbxInputParameters
All input widgets are configured usingNbxInputParameters, which provides a comprehensive set of properties:
Label text displayed above or inside the input
Placeholder text shown when input is empty
Whether the field is required (triggers validation)
Type of input:
text, email, password, number, etc.Controller for managing input value
Whether to obscure text (for passwords)
Whether the field is read-only
Whether the field is enabled
Maximum number of lines for multi-line inputs
Maximum character length
Custom validation function
Callback with final validation error (null = valid)
Callback when input value changes
Custom suffix icon widget
Custom prefix icon widget
Decoration style for the input field
Visual state:
neutral, success, or errorSupporting text displayed below the input
Whether to show character counter when maxLength is set
Input Types
Common input configurations:- Email
- Password
- Multi-line
NbxPhoneFieldWidget
A specialized widget that combines country picker and phone number input with automatic validation.Basic Usage
Features
- Automatic validation based on country-specific phone number lengths
- Phone input is read-only until a country is selected
- Clears phone number when country changes
- Validates min/max length based on selected country
The phone field automatically validates the phone number length based on the
minLength and maxLength properties of the selected Country object.NbxCountryPickerInput
A read-only input that opens a country picker dialog on tap.Basic Usage
NbxCountryPickerModalParameters
Configuration for the country picker modal:List of countries to display
Whether to show phone codes in the list
Title for the picker modal
Callback when a country is selected
Whether to show search functionality
Validation Examples
Custom Validation
Validation Result Callback
Best Practices
When using
isRequired: true, you must provide a requiredErrorMessage. This is enforced by compile-time assertions.For outlined decoration style, both
labelText and hintText must be provided.Use
onValidationResult for reactive UI updates based on validation state, not for implementing validation logic.