dart - Change the default border color of TextFormField in FLUTTER

ID : 131353

viewed : 8

Tags : flutterdarttextfielddefaultflutter-layoutflutter

Top 2 Answer for dart - Change the default border color of TextFormField in FLUTTER

vote vote

92

Use enabledBorder of the InputDecoration, don't forget you can also use the focusedBorder, like this :

InputDecoration(                 labelText: "Enter Email",                 fillColor: Colors.white,                 focusedBorder: OutlineInputBorder(                   borderRadius: BorderRadius.circular(25.0),                   borderSide: BorderSide(                     color: Colors.blue,                   ),                 ),                 enabledBorder: OutlineInputBorder(                   borderRadius: BorderRadius.circular(25.0),                   borderSide: BorderSide(                     color: Colors.red,                     width: 2.0,                   ),                 ), ) 

Here you have more info: https://api.flutter.dev/flutter/material/InputDecoration/enabledBorder.html

vote vote

82

Top 3 video Explaining dart - Change the default border color of TextFormField in FLUTTER

Related QUESTION?