Complete Code For Change Input Textfield Underline Color In Flutter
main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: Colors.green,
title: Text("Change Input Text Field BOttom Underline Color"),
),
body: SafeArea(
child: Column(
children: <Widget>[
Container(
width: 290,
padding: EdgeInsets.all(10.0),
child : TextField(
autocorrect: true,
decoration: InputDecoration(
hintText: 'UserName',
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.pink),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.green),
),
)
)
),
Container(
width: 290,
padding: EdgeInsets.all(10.0),
child : TextField(
autocorrect: true,
decoration: InputDecoration(
hintText: 'E-mail',
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.pink),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.green),
),
)
)
),
],
)
)
));
}
}