textFormDecoration function
- String title,
- String hint,
- IconData icon,
- BuildContext context
Returns the input decoration for a text form field.
This function creates and returns an InputDecoration object with the specified title, hint, icon, and context.
Implementation
InputDecoration textFormDecoration(
String title,
String hint,
IconData icon,
BuildContext context,
) {
return InputDecoration(
labelText: title,
hintText: hint,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(100),
),
prefixIcon: Icon(icon),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(16),
borderSide: BorderSide(
color: Theme.of(context).colorScheme.primaryContainer,
width: 4,
),
),
);
}