Home > Blockchain >  A RenderFlex overflowed by 93 pixels on the bottom
A RenderFlex overflowed by 93 pixels on the bottom

Time:02-16

enter image description here

Form(
              key: _formKey,
              child: Container(
                alignment: Alignment.center,
                height: 55,
                width: 200,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(10),
                  border: Border.all(color: Colors.black,width: 2)
                ),
                child: DropdownButtonHideUnderline(
                  child: DropDownField(
                    value: value,
                    enabled: true,
                    items: locationItem,
                    itemsVisibleInDropdown: 2,
                    onValueChanged: (value) {
                      setState(() {
                        this.value = value!;
                        locationId = value;
                        print(value);
                        print(locationId);
                      });
                    },
                  ),
                ),
              ),
            )

I have tried Singlechildscrollerview also any answer regarding this:

CodePudding user response:

Try below code hope its help to you. Refer DropdownButton-class enter image description here

Your dropdown after selecting-> enter image description here

CodePudding user response:

Overflowing usually occurring when your widgets don't have enough space to implement.

So in your cause you can do following things,

Change your Container's size of height.

Wrap DropdownButtonHideUnderline widget with Expanded widget.

Wrap DropdownButtonHideUnderline widget with SizedBox and then put SizedBox's height same as your Container's height.

  • Related