Questions tagged [flutter-container]

For questions relating to Flutter's Container class. Use this tag in combination with the general [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.

Reference:

107 questions
1
vote
2 answers

The named parameter 'onTap' isn't defined

I currently learning Flutter and I'm very new to it. in my app I used responsive grid package and add Text in responsive container. i wanted to go to another page when tap on this text but my bad it gives me this error. The named parameter 'onTap'…
Mrunal
  • 578
  • 2
  • 21
  • 39
1
vote
2 answers

Can't center a column in a container

I've been trying to do this for a while and i just doesn't work. I've tried using Center() and it doesn't work even without errors. I also tried using mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, for…
Viqtoh
  • 192
  • 1
  • 2
  • 12
1
vote
3 answers

flutter only bottom shadow to container

i have tried many solution but i couldn't get what i want. https://stackoverflow.com/a/56744034/4862911 i applied in this answer but couldn't get correct response. There is still shadow top of container. How can i achieve it? and also i have tried…
aligur
  • 3,387
  • 3
  • 34
  • 51
1
vote
2 answers

How to set background image in flutter?

I have started learning flutter recently, I want to add background image and on it I want to add two flat buttons, But I am not able to do it, I have added background image in code, but it is not working I didn't understand the problem. Could anyone…
1
vote
3 answers

flutter - Container with bottom text field

I have circle avatars. I want to add each circle's avatar name at the bottom of the avatar. But I can not do this. when I run the below code, the text appears on the avatar. My code child: Container( height: 60.0, width:…
jancooth
  • 555
  • 1
  • 10
  • 25
1
vote
3 answers

Flutter - ListView is not Scrolling inside Drawer

I used a ListView inside a Drawer Widget and Used ListView.Builder inside that ListView to print out menus. Now All Menus are Printed Perfectly But The Drawer is not Scrolling. How to make it scroll? Widget build(BuildContext context) { return…
1
vote
1 answer

BoxConstraints maxHeight is always applied when set

I have a container in which I have set the below constraints value constraints: BoxConstraints(maxHeight: 300), In the container widget, It has a child whose height is set to 200 but when the app is run the height is set to 300 instead of 200. How…
bnayagrawal
  • 1,044
  • 3
  • 12
  • 22
0
votes
0 answers

How to fill Wrap-Widget's available space?

I have a Wrap Widget which has a couple of Containers as children. These Containers have a Text Widget as child with different String lengths. return SizedBox( height: MediaQuery.of(context).size.height * 0.3, width:…
Yuki
  • 255
  • 1
  • 2
  • 9
0
votes
2 answers

vertical divider is not displaying on my emulator in flutter

I have tried using the widget verticaldivider() in flutter, The code seems to work fine but i the divider is not visible on my app. where i want it to be. I want the divider to be between two images. The images are moved a little bit when i alter…
Ahmad Maaz
  • 45
  • 6
0
votes
1 answer

Flutter container doesnot change as the bool becomes true in ternary operator

selectedDateTime != null //if true ? Container( decoration: BoxDecoration( gradient: LinearGradient( colors: [Colors.grey, Colors.black87], …
0
votes
2 answers

Not able to set BorderRadius at bottomRIght side for Container

I want to give bottom right corner radius to Container. For that I have set right and bottom border of the Container. However, it is not allowing me to set the bottom right corder radius. The following is the code. Container( …
Mahendra
  • 8,448
  • 3
  • 33
  • 56
0
votes
3 answers

How to hide a part of the container widget beyond the screen without violating Flutter's layout constraints

I am new to flutter. And i am trying to hide the bottom red part (see the first screenshot) of the blue container under the screen, in order to hide the buttom part of a white border and use this container for the animation. But it generates a…
0
votes
3 answers

Container border is not cliping in flutter

I want to make a UI which has a outer container which has border. Inside the container I have a column which contains a image and a container text inside. I want the inner container which has text to on top of border of outer container so that…
0
votes
1 answer

Need automatic adjustment for my text to fit within a container with a length of 100

Container( height: 100, color: Colors.black, child: const Text( 'height, width vs varsa önce bunlar kendisini ön plana çıkartır. ardından expanded olanlar geri kalan kısımları…
UF7K
  • 3
  • 3
0
votes
1 answer

how to a place half of the widget outside of another widget in flutter?

I have a Column which has a 2 items : 1- badge and 2- container . I want to place the half of the badge inside the container , the image will be more clear , and here is the parts of code : Column( mainAxisAlignment:…
behnami454
  • 77
  • 8