flutter_inputbox 0.0.1 copy "flutter_inputbox: ^0.0.1" to clipboard
flutter_inputbox: ^0.0.1 copied to clipboard

A customizable input box widget with support for colors, icons, validation, and more.

InputBox Widget #

A fully customizable Flutter InputBox widget designed for building dynamic and stylish input fields with ease.

Features #

  • Customizable Design: Adjust field colors, borders, labels, and hint styles.
  • Icons Support: Add prefix and suffix icons with custom actions.
  • Validation: Includes built-in support for validation with custom logic.
  • Text Customization: Configure text behavior with TextEditingController, TextInputFormatter, and TextCapitalization.
  • Responsive Design: Built with flutter_screenutil for consistent scaling across devices.
  • Event Handling: Callbacks for onTap, onChanged, and onEditingComplete events.
  • New Feature: Added color property to allow custom colors for text, cursor, borders, and icons.

Installation #

Add the following to your pubspec.yaml:

dependencies:  
  your_package_name: ^0.0.1  


#Usage
import 'package:flutter/material.dart';
import 'input_box.dart';

class MyForm extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('InputBox Example')),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: InputBox(
          hintText: "Enter your name",
          labelText: "Name",
          maxLength: 50,
          keyboardType: TextInputType.text,
          prefixIcon: Icons.person,
          suffixIcon: Icons.clear,
          color: Colors.blue,
          onSuffixIconPressed: () {
            print("Suffix icon pressed");
          },
          validator: (value) {
            if (value == null || value.isEmpty) {
              return "Please enter a name";
            }
            return null;
          },
        ),
      ),
    );
  }
}
0
likes
130
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable input box widget with support for colors, icons, validation, and more.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_screenutil

More

Packages that depend on flutter_inputbox