custom_text_form_field

Creator: coderz1093

Last updated:

0 purchases

custom_text_form_field Image
custom_text_form_field Images

Languages

Categories

Add to Cart

Description:

custom text form field

custom_textfield_package #
A new Flutter package (custom textfield package).
Getting Started #

For Call Class

CustomTextField(
width: size.width * 0.39,
label: getTranslated(context, "first_name"),
isRequired: true,
controller: _firstNameController,
maxLength: 30,
withValidate: true,
),
copied to clipboard
import 'package:custom_text_form_field/custom_textfield.dart';
import 'package:flutter/material.dart';

class LoginPage extends StatelessWidget {
const LoginPage({Key key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Column(
children: [
SizedBox(height: 50,),
CustomTextField(
label: "First name",
isRequired: true,
maxLength: 30,
withValidate: true,
errorText: "please enter you first name",
),
SizedBox(height: 20,),
CustomTextField(
label: "Email",
prefixIcon: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(
Icons.email
),
),
customValidator: (value) {
if (value.toString().trim().isEmpty) {
return "can_not_empty";
}return null;
},
),
],
),
);
}
}

copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.