Input Field

Input Field

MUIPrimaryInputField

A basic input text field widget provided by Modular UI.

Properties

  • widthFactor: double - A double value which gets multiplied with the current screen width to determine the width of the text field.

  • borderRadius: double - Border radius for the text field.

  • filledColor: Color - Filled color for the text field.

  • hintText: String - Hint text for the text field.

  • textStyle: TextStyle - Text style for the text field.

  • hintStyle: TextStyle - Hint style for the text field.

  • isObscure: bool - Is the text field obscured?

  • enabledBorderColor: Color - Border color when the text field is selected.

  • disabledBorderColor: Color - Border color when the text field is not selected.

  • borderWidth: double - Border width for the text field.

  • controller: TextEditingController - Text editing controller for the text field.

  • cursorColor: Color - Cursor color for the text field.

  • suffixIcon: Icon? - Icon for the suffix icon in the text field.

  • suffixIconOnPressed: VoidCallback? - Function for the suffix icon.

  • prefixIcon: Icon? - Icon for the prefix icon in the text field.

  • prefixIconOnPressed: VoidCallback? - Function for the prefix icon.

Example Usage

MUIPrimaryInputField(
          suffixIcon: const Icon(Icons.turn_slight_left, color: Colors.black,),
          hintText: 'Enter your name',
          controller: TextEditingController(),
          filledColor: Colors.white,
        ),

Notes

  • Provides a basic input text field with customizable properties.

  • Supports features like suffix icons, prefix icons, and custom styling.

  • Utilizes the TextFormField widget for text input handling.

Last updated