custom_text_field_with_drop_down 0.0.6
custom_text_field_with_drop_down: ^0.0.6 copied to clipboard
A new Flutter package for Custom Text Filed and Drop Down Widget.
📦 Custom Text Field With Drop Down #
A customizable Flutter widget combining a styled TextFormField with optional dropdown suggestions, gradient background, obscure text toggle, and reusable styles — fully null-safe.
✨ Features #
- ✅ Customizable border, hint style, fill color or gradient
- 🔒 Optional obscure text toggle with visibility icon
- 🔽 Optional dropdown suggestion list with live filtering
- 🎨 Reusable hint and suffix/prefix icons
- 📐 Supports maxLines, readOnly, input types, and more
📸 Screenshots #
[All Filed Related Example]
🚀 Getting Started #
Add this package to your pubspec.yaml:
🚀 Usages #
import 'package:custom_text_field_with_drop_down/custom_text_field_with_drop_down.dart';
CustomTextFieldWithDropDown( hintText: 'Enter your email', showObscure: false, fillColor: Colors.grey[200], borderColor: Colors.transparent, borderRadius: 10, dropdownShow: true, dropdownItems: ['Gmail', 'Yahoo', 'Outlook'], prefixIcon: Icons.email, suffixIcon: Icon(Icons.arrow_drop_down), );
🛠 Parameters #
| Parameter | Type | Default | Description |
|---|---|---|---|
hintText |
String |
— | Hint text shown inside the input field |
showObscure |
bool |
— | Enables password-style obscure toggle |
readOnly |
bool? |
false |
Makes the field read-only |
prefixIcon |
IconData? |
null |
Optional prefix icon |
suffixIcon |
Icon? |
null |
Custom suffix icon when showObscure is false |
showClearButton |
bool |
false |
Show clear (X) icon when input has text |
keyboardType |
TextInputType? |
text |
Type of input (text, number, email, etc.) |
controller |
TextEditingController? |
null |
Controller for accessing text field value |
borderColor |
Color? |
Colors.green |
Border color of the input field |
maxLines |
int? |
1 |
Max number of lines for the field |
borderRadius |
double? |
8.0 |
Radius for border corners |
hintStyle |
TextStyle? |
Default style | Optional text style for hint text |
fillColor |
Color? |
null |
Background color |
fillGradient |
Gradient? |
null |
Optional gradient background |
iconColor |
Color? |
Colors.grey |
Color for prefix/suffix icons |
dropdownShow |
bool |
false |
Show dropdown suggestions |
dropdownItems |
List<String> |
[] |
Static list of dropdown options |