TextFormField increase height with proper alignment

TextFormField increase height with proper alignment

Content Index :

TextFormField increase height with proper alignment
Tag : flutter , By : Josh
Date : January 12 2021, 09:11 PM

should help you out I'm trying to make my TextFormField 'bigger'. I tried this code, it does make it bigger, but if I type (here: qwerty) it starts in the middle. Is there an option to start in the left upper corner? , You can try this.
  padding: EdgeInsets.all(8.0),
  child: Container(
    width: 400,
    height: 120,
    child: Form(
      autovalidate: true,
      child: TextFormField(
        autofocus: true,
        validator: (val) {
          if (val.trim().length > 200)
            return "Beschrijving te lang";
            return null;
        maxLines: 100,
        decoration: InputDecoration(
          border: OutlineInputBorder(),
          filled: true,
          fillColor: Colors.white,
          labelText: "",
          labelStyle: TextStyle(fontSize: 15.0),
          hintText: "Enter a message",

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

How to get height of a TextFormField

Tag : development , By : lili
Date : March 29 2020, 07:55 AM
this will help You can get the size of any widgets using context.size. You can get a specific widget's context by setting a GlobalKey on the desired widget.

Flutter increase height of TextFormField

Tag : android , By : user121350
Date : March 29 2020, 07:55 AM
To fix this issue Just adjust the contentPadding in InputDecoration.
final email = TextFormField(
    keyboardType: TextInputType.emailAddress,
    autofocus: false,
    initialValue: 'sathyabaman@gmail.com',
    style: new TextStyle(fontWeight: FontWeight.normal, color: Colors.white),
    decoration: InputDecoration(
      hintText: 'Email',
      contentPadding: new EdgeInsets.symmetric(vertical: 25.0, horizontal: 10.0),
      border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),

Validator error message changes TextFormField's height

Tag : flutter , By : John
Date : March 29 2020, 07:55 AM
To fix this issue In your Code - you need to comment out the 40 height given to each container.
             // height: 40.0,
              child: _createTextFormField(
                  "Email Adress",
            //  height: 40.0,
              child: _createTextFormField(loginPasswordController, Icons.lock,
                  "Password", true, TextInputType.text),
      EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0),

How to increase Card elevation when TextFormField focused?

Tag : android-studio , By : JoeCh
Date : December 25 2020, 12:01 PM
Hope that helps The TextFormField has a property called focusNode. Here is an example on how it can be used.

class MyClass extends StatefulWidget {
  _MyClassState createState() => new _MyClassState();

class _MyClassState extends State<MyClass> {
  FocusNode _focusA = new FocusNode();
  FocusNode _focusB = new FocusNode();
  int _elevation = 5;

  void initState() {

  void _onFocusChange(){
    if (_focusA.hasFocus || _focusB.hasFocus)
      setState(() => _elevation = 10);
     setState(() => _elevation = 10);

  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: 25, vertical: 30),
        child: Card(
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadiusDirectional.circular(10),
          elevation: _elevation,
          child: Column(
            children: <Widget>[
                padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
                child: TextFormField(
                  focusNode: _focusA,
                padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
                child: TextFormField(
                  focusNode: _focusB,

Proper HTML alignment/sizing of two adjacent 50%-width/equal height fieldsets with a 100%-width below?

Tag : javascript , By : hellboy32
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • MaterialApp must it be only one in the whole application?
  • How to disable a linting rule inline in flutter
  • Flutter: How to export SQLite database as CSV?
  • A non-null String must be provided to a Text widget
  • How to add a texfield inside the App bar in Flutter?
  • Is it possible to use Android Studio to build a website in flutter
  • TextField reloads FutureBuilder when pressed/left in Flutter
  • how to do pagination in GridView (Flutter)
  • The Drawer is transparent
  • How to fix overflowed issue in Dialog?
  • How to put icon on string in flutter?
  • How to remove extra spaces in Flutter button bar?
  • Flutter: ClipRRect vs Container with BoxDecoration
  • why does a function work before its time?
  • What is the difference between ListView and ListView.builder and can we use Listview.builder to create and validate and
  • Is there any way to add tawk.to chat service to my flutter application
  • How do you link firebase accounts in firebase_auth 0.11.1 in flutter?
  • Flutter Scrollable Stack with Height greater than Screen Height
  • How to get current URL in Flutter Web App
  • Why ApplicationsDocumentsDirectory return null for unit test?
  • Exception: ideviceinfo returned an error: ERROR: Could not connect to lockdownd, error code -17
  • Using Flutter to develop a SDK to be used in Native iOS and Android
  • How to change Scrollbar's thickness?
  • "Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'. ',"
  • It's possible run code like a "background service" when the app is closed using flutter?
  • Flutter Format Time of Day from time picker
  • firebase_messaging onResume and onLaunch not working
  • Where do I run initialisation code when starting a flutter app?
  • Web view is too slow
  • Setting up flutter
  • bottom navigation bar transition in flutter
  • Flutter - how create rounded background color?
  • How to improve speed of query for Firestore + Flutter?
  • Example on when to use didUpdateWidget
  • Wait for page transition to finish
  • Remove duplicates from Json response flutter
  • StreamBuilder doesn't rebuilds after stream changed by setState
  • Disable Word Underlining in TextFormField
  • How to create a Card with both an inner shadow and a gradient fill
  • Pressing enter / return button on iOS simulator keyboard doesn't store the TextField onChanged data Why?
  • Is there a way I can continuously change some text in certain interval of time?
  • Calling Drain() on a Stream never returns and the stream never closes
  • Flutter spaceBetween doesn't work in Column inside Card widget
  • use a callback on an animated button class
  • How to give onPress function for BottomNavigationBar menu in flutter?
  • How to make a 60fps navigation flutter
  • Declare variable with return value of a future
  • How to select Birth date with DateFormat in flutter?
  • How to get theme color inside the widget in Flutter
  • TextFormField, change icon and text colors
  • Is using AnimatedOpacity to hide and show complex widgets not effective in Flutter?
  • How big is too big in flutter shared_preferences?
  • BottomNavigationBar title not showing in Flutter
  • Difference between yield and yield* in Dart
  • How to make changes in flutter plugins code locally
  • Google Places API in Flutter
  • Flutter how to manually install packages
  • AnimatedContainer Button class not being animated
  • Access values and functions from child components
  • Flutter animate reverse effect on FadeTransition
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com