intelligentsia_forms
Package
The intelligentsia_forms
package for Flutter provides a robust toolkit to create customizable sign-in and sign-up
forms. It includes components for various form fields such as Email, Name, Password, About Me, Country, Birth Date, and
Gender. Each component supports extensive customization options, including color, font, icon, and layout styling, to
give users a tailored experience.
Key Features
- Highly customizable components for creating user-friendly forms.
- Flexible styling options to fit any design theme.
- Easy handling of user-input data, including validation and data processing.
- Pre-built components for standard form fields to simplify development.
Component Documentation
SmartTextFormField
The SmartTextFormField
widget is a versatile text field component designed for fields like email, password, username,
and "About Me." Each field type comes with specialized settings to enhance usability.
Features
-
Form Type-Specific Customization
- Placeholder text, icons, validation, and keyboard types adapt based on the selected
formType
(email
,password
,aboutMe
, oruserName
). - Form-specific settings, like toggling password visibility.
- Placeholder text, icons, validation, and keyboard types adapt based on the selected
-
Field Label Customization
- Customize the label's color, font size, and font weight for distinct appearances.
-
Hint Text Styling
- Set custom hint text color, font size, and font weight.
-
Icon Options
- Configurable prefix and suffix icons with options for outlined icons.
- Control icon color and size for consistent design.
-
Border Styling
- Adjustable border radius and color settings for various states (enabled, focused, error).
-
Error Message Styling
- Customizable error message styling for clear user feedback.
-
Flexible Padding Options
- Separate padding options inside and outside the field.
-
Data Control
- Supports custom
TextEditingController
andonChanged
handlers. - Limits on maximum and minimum lines for fields like “About Me.”
- Supports custom
-
Global Styling
- Options to set background fill color and primary color.
-
Password Toggle
- For
password
fields, a suffix icon toggles password visibility.
- For
Standard Style
CountrySelector
The CountrySelector
widget lets users pick a country, displaying the selected country’s name and flag.
Features
-
Country Selection Callback
- Calls a function (
onCountrySelected
) with the selected country’s name, code, and flag.
- Calls a function (
-
Customizable Field Label
- Customize the label displayed above the field (text color, font size, and weight).
-
Hint Text Styling
- Adjust the hint text's color, font size, and weight.
-
Icon Customization
- Configurable prefix and suffix icons (e.g., flag and info icons).
- Option to enable or disable an
info
suffix icon.
-
Flush Bar Notifications
- Optional
Flushbar
message displayed when the info icon is tapped, with customizable content, duration, and position.
- Optional
-
Global and Border Styling
- Set the primary color, fill color, border radius, and border style.
-
Padding Control
- Separate options for inside and outside padding.
-
Country Display
- Displays the selected country name and flag in the field, with styling for unselected and selected states.
-
Country Picker Integration
- Allows browsing and selecting a country via a modal picker.
Standard Style
DateSelector
The DateSelector
widget provides a date picker for selecting and displaying dates.
Features
-
Date Selection Callback
- Calls a function (
selectedDate
) with the selected date’s year, month, and day.
- Calls a function (
-
Field Label Customization
- Adjustable label color, font size, and font weight.
-
Hint Text Styling
- Custom hint text styling displayed inside the field when no date is selected.
-
Icon Customization
- Configurable prefix icon (calendar icon) with color, size, and outlined style.
-
Padding and Border Styling
- Inside and outside padding options and customizable border style.
-
Date Constraints
- Minimum and maximum date settings to restrict selection range.
-
Selected Date Display
- Displays the chosen date in a formatted style.
-
Date Picker Integration
- Opens a date picker modal with custom primary and fill colors.
Standard Style
GenderSelector
The GenderSelector
widget lets users select gender from customizable options.
Features
-
Gender Selection Callback
- Calls
onGenderSelected
function with the chosen gender.
- Calls
-
Customizable Field Label
- Adjustable label color, font size, and weight.
-
Flexible Gender Options
- Customizable list of gender choices (default is
['Male', 'Female']
).
- Customizable list of gender choices (default is
-
Text Styling for Options
- Customizable font size and dynamic color based on selection state.
-
Color and Border Styling
- Configurable primary color, font color, background fill, and border radius.
-
Interactive Gender Selection
- Gender options behave as interactive buttons, with distinct styling for selected options.
`SocialAuthButton
The SocialAuthButto
n widget provides a customizable button for social media authentication. It supports various social
media providers, including Google, Facebook, Apple, Twitter, Pinterest, and LinkedIn, and allows for either outlined or
solid logos.`
Features
-
Social Media Provider Support
- Includes icons for Google, Facebook, Apple, Twitter, Pinterest, and LinkedIn.
- Automatically selects the appropriate logo based on the chosen provider.
-
Outlined or Solid Logo
- Choose between an outlined or filled logo style by setting the
outlinedLogo
property.
- Choose between an outlined or filled logo style by setting the
-
Customizable Background and Padding
- Set background colors and padding for both outlined and solid logo styles.
-
Configurable Button Size
- Customize the width and height of the button to fit your design.
-
Border Radius and Box Shadow
- Customize the button's border radius and add a box shadow for added depth.
-
On-Tap Callback
- Easily handle user interactions with an
onTap
callback.
- Easily handle user interactions with an
Standard Style
Installation
Add intelligentsia_forms
to your pubspec.yaml
:
dependencies:
intelligentsia_forms: ^latest_version
Note
The CountrySelector
widget uses the Flushbar
package for displaying notifications. Ensure the another_flushbar
dependency is added to your project.
ThemeColors
is a custom color class. Replace it with your app's color theme as needed.
Dependencies
dependencies:
flutter:
sdk: flutter
another_flushbar: ^1.10.0
country_picker: ^2.0.9