How to give dropdownitems a larger width than the container( Dropdown Button ) in flutter

152

This question shows how to make the popup different, you can use the same strategy: How to make flutter custom drop down button?

Share:
152
Admin
Author by

Admin

Updated on December 12, 2022

Comments

  • Admin
    Admin over 1 year

    I am working on a flutter app. I have a dropdownbutton on the appbar. There is a search bar next to it, so I don't want it to take too much space when it isn't open. I want it to take as much space as possible when it is opened.

    I expect it to act as shown in the links below. Sorry, stack overflow won't allow me to include the images here. not open open

    • xiawi
      xiawi almost 5 years
      Welcome to SO. What is the problem exactly ? Please see How to Ask and give a minimal reproducible example from your tries
    • Admin
      Admin almost 5 years
      Thank you for the welcoming. I am a newbie here. I wanted to replicate what I have done on native android ( The app shown in the links to the images) using flutter. I couldn't find a way to give the drop down items full width only when they are listed( not in condensed mode).
    • Gazihan Alankus
      Gazihan Alankus almost 5 years
  • Admin
    Admin almost 5 years
    This is a really nice approach! It can make the popup different, but for some reason it is not enabling me to give the popup a greater width than the collapsed one.
  • Gazihan Alankus
    Gazihan Alankus almost 5 years
    Hmm, I would inspect up the tree and see what's forcing the width and see if I can modify it for the two case...