FlexiFormField (v2.0.1)
A highly flexible and customizable library of Flutter form widgets with built-in validation, premium styling, and a centralized theming system.
✨ Features
- Standardized Theming: Control colors, borders, and typography across all widgets using
FlexiFormTheme. - Multiple Border Styles:
outline,rounded,underline,filled, andminimal. - Built-in Validation: Smart validation for Email, Mobile, GST, Pin Code, and more.
- Premium Widgets:
FlexiFormField: Advanced text input with layout options.FlexiDatePicker/FlexiTimePicker/FlexiDateTimePicker: Polished date/time selection.FlexiDropDown: Reusable and styled selection menu.FlexiAutoComplete: Integrated suggestions/typeahead field.FlexiButton: Stylish buttons with gradient support.FlexiStepper/FlexiTabBar: Smooth navigation components.FlexiTimer: Countdown and stopwatch widget.
- Publication Ready: 0 analysis issues, fully documented, and optimized performance.
📦 Installation
Add this to your pubspec.yaml:
dependencies:
flexi_form_field: ^2.0.1
🔧 Basic Usage
Initialize the library and start using the fields:
import 'package:flexi_form_field/flexi_form_field.dart';
// Standard Text Field
FlexiFormField(
label: "User Name",
hint: "Enter your full name",
isMandatory: true,
fieldStyle: FlexiFieldStyle.outline,
)
// Date Picker
FlexiDatePicker(
label: "Date of Birth",
controller: dateController,
dateFormat: "yyyy-MM-dd",
)
🎨 Professional Styling
FlexiFormField supports multiple layout and border styles:
Field Styles
FlexiFieldStyle.outline: Traditional outlined border.FlexiFieldStyle.rounded: Modern rounded (pill-shaped) border.FlexiFieldStyle.filled: Subtly filled background without borders.FlexiFieldStyle.underline: Clean material-style underline.
Field Layouts
FlexiFieldLayout.floating: Label floats to the top when focused.FlexiFieldLayout.above: Label stays consistently above the field.FlexiFieldLayout.labelInline: Label is prefixed inside the field.
🔐 Advanced Validation
Easily apply complex validation rules without boilerplate:
FlexiFormField(
label: "Email",
isEmail: true,
isMandatory: true,
autoValidate: true,
)
FlexiFormField(
label: "Mobile Number",
isMobile: true,
maxLength: 10,
)
🛠 Centralized Theme
Apply a uniform look to all your form fields using FlexiFormTheme:
FlexiFormTheme(
primaryColor: Colors.deepPurple,
fillColor: Colors.purple.withOpacity(0.05),
borderRadius: BorderRadius.circular(12),
labelStyle: TextStyle(fontSize: 16, color: Colors.black87),
)
📋 Comprehensive Widgets
- FlexiButton:
FlexiButton(text: "Submit", onTap: () => print("Clicked!"), color: Colors.blue) - FlexiDropDown:
FlexiDropDown(label: "Gender", items: ["Male", "Female"], onSelected: (v) => ...) - FlexiTimer: Countdown or stopwatch with customizable formatting.
- FlexiStepper: Horizontal progress steps with active/inactive states.
📝 License
This package is available under the MIT License.
Libraries
- flexi_form_field
- Exports the primary form-field toolkit of the package, including all core widgets, validators, input formatters, and utilities.