TextField( enabled: false, // to trigger disabledBorder decoration: InputDecoration( filled: true, fillColor: Color(0xFFF2F2F2), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(4)), borderSide: BorderSide(width: 1,color: Colors.red), ), disabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(4)), borderSide: BorderSide(width: 1,color: Colors.orange), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(4)), borderSide: BorderSide(width: 1,color: Colors.green), ), border: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(4)), borderSide: BorderSide(width: 1,) ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(4)), borderSide: BorderSide(width: 1,color: Colors.black) ), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(4)), borderSide: BorderSide(width: 1,color: Colors.yellowAccent) ), hintText: "HintText", hintStyle: TextStyle(fontSize: 16,color: Color(0xFFB3B1B1)), errorText: snapshot.error, ), controller: _passwordController, onChanged: _authenticationFormBloc.onPasswordChanged, obscureText: false, ),
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter