Want to add Drop Shadow to TextFormField In Flutter? You can Wrap your TextFormField with a Material widget and edit its properties such as elevation and shadowColor.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Material( elevation: 20.0, shadowColor: Colors.blue, child: TextFormField( obscureText: true, autofocus: false, decoration: InputDecoration( icon: new Icon(Icons.lock, color: Color(0xff224597)), hintText: 'Password', fillColor: Colors.white, filled: true, contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), enabledBorder: OutlineInputBorder(borderRadius:BorderRadius.circular(5.0), borderSide: BorderSide(color: Colors.white, width: 3.0)) ), ), ) |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.