custom_info_text_field 0.0.1 copy "custom_info_text_field: ^0.0.1" to clipboard
custom_info_text_field: ^0.0.1 copied to clipboard

A flexible Flutter widget for input fields, supporting both text fields and dropdowns with various configurations.

custom_info_text_field #

A flexible Flutter widget for input fields, supporting both text fields and dropdowns with various configurations.

Features #

  • Textfield: Allows users to input text or information directly into the field with options for customization.
  • Dropdown: Presents users with a predefined list of options to choose from, enhancing user experience.

Installation #

To use this package, add info_field as a dependency in your pubspec.yaml file.

Usage #

Import the package in your Dart code:

Textfield Example:

    InfoField(
  label: 'Name',
  onChanged: (value) {
    // Handle the input change
  },
  // Add more configurations as needed
)

Dropdown Example:

InfoField(
  label: 'Gender',
  values: [
    DropdownValue(display: 'Male', value: 'male'),
    DropdownValue(display: 'Female', value: 'female'),
  ],
  onChanged: (value) {
    // Handle the dropdown selection
  },
  // Add more configurations as needed
)

Parameters #

  • label: The label displayed above the input field.

  • isRequired: Whether the field is required or not (default is true).

  • value: Initial value of the field.

  • asNumber: If true, formats the input as a number.

  • asAmount: If true, formats the input as a currency amount.

  • widget: Additional widget to be displayed instead of the default input field.

  • onChanged: Callback function called when the value changes.

  • onSubmit: Callback function called when submitting the field.

  • onTap: Callback function called when tapping on the field.

  • values: List of options for dropdown fields.

  • inputFormatters: List of input formatters to customize input behavior.

  • textCapitalization: Text capitalization behavior.

  • keyboardType: Keyboard type to use for the input field.

  • autoFocus: Whether the field should autofocus.

  • readOnly: Whether the field is read-only.

  • maxLength: Maximum length of the input.

  • validator: Validator function for input validation.

  • maxLines: Maximum number of lines for multi-line input fields.

  • onEditingComplete: Callback function called when editing is completed.

  • counterText: Text displayed as a counter for the input.

  • counterBool: If true, displays a counter for the input.

    License #

    This package is licensed under the MIT License.

1
likes
80
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

A flexible Flutter widget for input fields, supporting both text fields and dropdowns with various configurations.

Homepage

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

currency_text_input_formatter, flutter, pattern_formatter

More

Packages that depend on custom_info_text_field