In this example, I have shown how to achieve few common queries with TextField.
font-size: 1rem;](
How to get a number keyboard when TextField is selected in Flutter?
How to show an Icon inside the TextField in Flutter?How to show a Placeholder Text inside the TextField in Flutter?How to color a TextField in Flutter?How to decorate TextField in Flutter?
; background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre-wrap;](color: #569cd6;](import color: #ce9178;]('package:flutter/material.dart';
color: #569cd6;](void main() => runApp(MyApp());
color: #569cd6;](class MyApp color: #569cd6;](extends StatelessWidget { color: #569cd6;](@override Widget build(BuildContext context) { color: #569cd6;](return MaterialApp( home: Scaffold( appBar: AppBar( title: Text(color: #ce9178;]('Keyboard Type Example'), ), body: Center( child: Container( margin: EdgeInsets.all(color: #b5cea8;](20.0), child: TextField( keyboardType: TextInputType.number, decoration: InputDecoration( prefixIcon: Icon(Icons.text_fields), filled: color: #569cd6;](true, fillColor: Colors.grey[color: #b5cea8;](400], hintText: color: #ce9178;]('Select this TextBox' ), ), ), ), ), ); }}
Hope this is helpful.
Thanks,Srikanth