easier_flutter 1.0.1 easier_flutter: ^1.0.1 copied to clipboard
A project that targets to make experiencing Flutter better and easier.
easier_flutter #
This package adds two new color parameters to the decoration of the TextFormField widget in Flutter, allowing users to easily control the input field's colors. It does so without altering any existing widget structure, only adding two new parameters: focusedBackgroundColor and noFocusedBackgroundColor.
Features #
- Changes background color when the
TextFormField
is focused or unfocused. - Fully customizable with options for focus and unfocused background colors.
- Easy to use and integrate into your Flutter project.
Usage #
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: TextFormField(
controller: _controller,
focusNode: _focusNode,
decoration: InputDecoration(
labelText: 'Search...',
).addFocusBackgroundColors(
focusedBackgroundColor: const Color(0x4D9489F5),
noFocusedBackgroundColor: Colors.white,
),
),
);
}