<p>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?</p> <p>; 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' ), ), ), ), ), ); }}</p> <p>Hope this is helpful. Thanks,Srikanth</p>
TextField in Flutter
This Article is posted by seven.srikanth at 8/14/2019 12:47:57 PM
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter
Tags: TextField; Keyboard type; Number Keyboard; Icon; Placeholder Text; HintText; Hint; Color;
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter