custom_text_form_field 0.0.6 copy "custom_text_form_field: ^0.0.6" to clipboard
custom_text_form_field: ^0.0.6 copied to clipboard

This package contains a text box that you pass properties to. It is flexible that you can control as you like, such as color, length, width, font size suitable for all screens.

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
2
likes
120
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

2024.07.08 - 2025.01.20

This package contains a text box that you pass properties to. It is flexible that you can control as you like, such as color, length, width, font size suitable for all screens.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on custom_text_form_field