Custom Border Text Field
A feature-rich Flutter text field widget that offers date/time pickers, form validation, custom borders, icons, and error handling. Perfect for creating professional and user-friendly input forms.
Screenshots

Features
- Customizable border styling
- Support for prefix and suffix icons
- Configurable text input types
- Input formatting support
- Label and hint text customization
- Icon color customization
- Filled background option
- Date and time picker integration
- Form validation support
- Text selection control
Getting started
Add this to your package's pubspec.yaml file:
dependencies:
custome_border_text_field: ^1.0.0
Usage
import 'package:custome_border_text_field/custome_border_text_field.dart';
BorderTextField(
labelText: 'Username',
hintText: 'Enter your username',
controller: _controller,
prefixIcon: Icon(Icons.person),
onChanged: (value) {
print('Text changed: $value');
},
isMandatory: true,
isLabelRequired: true,
);
Parameters
Required Parameters
labelText(String): Text label for the fieldhintText(String): Placeholder text shown when field is emptyonChanged(Function): Callback function when text changescontroller(TextEditingController): Controller for managing the text field
Optional Parameters
obscureText(bool): Hide text input, useful for passwordsprefixIcon(Widget?): Icon widget displayed before the textsufixIcon(Widget?): Icon widget displayed after the texticonColor(Color?): Color for the prefix and suffix iconsinputType(TextInputType): Keyboard type (e.g., text, number, email)inputFormatters(Listfilled(bool): Enable/disable background fillfillColor(Color?): Background color when filled is trueerrorMessage(String?): Error message to display below the fieldmaxLine(int?): Maximum number of lines for multiline inputmaxLength(int?): Maximum number of characters allowedenable(bool): Enable/disable user interactionisMandatory(bool): Show red asterisk (*) for required fieldsisLabelRequired(bool): Show/hide the label textvalidator(Function?): Form validation functiontextAlign(TextAlign?): Text alignment within the field
Date and Time Picker Options
isDatePicker(bool): Enable date picker modeisTimePicker(bool): Enable time picker modefirstDate(DateTime?): Minimum selectable datelastDate(DateTime?): Maximum selectable datetimeOfDay(TimeOfDay?): Initial time for time pickeris24Hour(bool): Use 24-hour format for time picker
Layout and Visibility
marginTop(int): Top margin for the field containerisVisible(bool): Show/hide the entire fieldenableCopy(bool): Allow/disallow text copyingenableInteractiveSelection(bool): Enable/disable text selection
Additional information
Created by Amol Gahukar. For issues and feature requests, please visit the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Libraries
- custome_border_text_field
- A Flutter package that provides a highly customizable text field widget with built-in support for date/time pickers, form validation, custom borders, and error handling.