custom_text_form_field_plus 0.0.1
custom_text_form_field_plus: ^0.0.1 copied to clipboard
Custom Text Form Field Plus - A Customizable Text Input Widget with Validation for Flutter
Custom Text Form Field Plus - A Customizable Text Input Widget with Validation for Flutter #
custom_text_form_field_plus
is a customizable text input field widget for your Flutter project. It
provides a feature-rich text input field with support for labels, hints, validation, and more. This
widget simplifies the process of creating and customizing text input fields in your Flutter
applications.
Platform Support #
Android | iOS | Web | MacOS | Linux | Windows |
---|---|---|---|---|---|
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Installation #
To use custom_text_form_field_plus
in your Flutter project, follow these steps:
- Add the package to your
pubspec.yaml
file and runflutter pub get
:
dependencies:
custom_text_form_field_plus: ^1.0.0
- Import the package in your Dart code:
import 'package:custom_text_form_field_plus/custom_text_form_field_plus.dart';
Usage #
To create a customized text input field with validation using custom_text_form_field_plus
, you can use the CustomTextFormField
widget and the provided Validations
class for validation functions. Here's an example:
import 'package:custom_text_form_field_plus/custom_text_form_field_plus.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Custom Text Form Field Plus'),
),
body: Column(
children: [
CustomTextFormField(
labelText: 'Name',
hintText: 'Enter Name',
validator: (String? value) => Validations.emptyValidation(value),
),
CustomTextFormField(
labelText: 'Email',
hintText: 'Enter Email',
validator: (String? value) => Validations.emailValidation(value),
),
CustomTextFormField(
labelText: 'Phone Number',
hintText: 'Enter Mobile Number',
validator: (String? value) => Validations.contactNumberValidation(value),
),
],
),
),
);
}
}
Customizations #
CustomTextFormField
provides various customization options through its constructor parameters. You can customize attributes like labelText
, hintText
, validator
, and more to suit your application's requirements.
For more details on customization options, refer to the CustomTextFormField API documentation.
Author #
If you have any questions or need assistance, please feel free to contact the author.