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.
Questions tagged [flutter-container]
107 questions
0
votes
1 answer
flutter: BoxShadow errors
Container(
decoration: BoxDecoration(
boxShadow: BoxShadow(
color: Colors.black,
blurRadius: 5,
spreadRadius: 6,
),
color: Color.fromARGB(255, 255, 255, 255),
border: Border(
left: BorderSide(color:…

lucy
- 21
- 7
0
votes
2 answers
Keep Flutter widget at fixed size upon resizing window
I have the following in my widget's build method:
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Title bar'),
),
body: Center(
…

user2649681
- 750
- 1
- 6
- 23
0
votes
0 answers
Flutter how to fade out a widget on dispose
What is the best way to animate a widget before it is removed from the widget tree? Is this even possible or are there any alternative solutions?

May
- 93
- 7
0
votes
1 answer
【Flutter/Dart】(Self-produced class)FooDecoration's issue. Container under Container(Column) is not drawn
I found a class called FooDecoration on the internet, and I am using it.
FooDecoration replaces BoxDecoration of Container.
I am having trouble drawing a Container that exists below a Container to which I have applied FooDecoration.
The first image…

Leon
- 3
- 1
0
votes
1 answer
Flutter: How to identify if a widget is Container() / ListTile()?
if i have a listview builder which is comprised of empty Container() and ListTile() in random order, how can i identify which widget appeared at particular index ?

icantcode
- 142
- 1
- 15
0
votes
1 answer
Drag a container vertically up and down to a certain level flutter
I am new to gestures and I don't get any proper solution for achieving my request,
Can anyone help me in dragging a container up and down vertically to a certain point?.
I need to achieve something like the below image.
Thanks in advance.

S4NJ33V
- 21
- 1
- 4
0
votes
2 answers
Flutter - How to adjust position of an image in a container with fit:boxfit.cover
so i have a container that displays an image, and the image fitted to the container with fit:BoxFit.cover, here is the code:
Container(
width: 80,
height: 80,
decoration: BoxDecoration(
borderRadius:…

Jilan Dirgantara
- 61
- 1
- 4
0
votes
6 answers
How to center Text widget vertically inside a container of fixed height in Flutter
I want to center a Text Widget vertically inside a container with a fixed height. But, I want to keep the width of the container dynamic which will change according to the length of the Text.
I tried using the Center and Align over the Text widget…

Ankan Sharma
- 61
- 1
- 7
0
votes
1 answer
How do you center two texts in containers inside a row widget?
How do you center two texts in containers inside a row widget?
0
votes
1 answer
Flutter Container Border too tall
I'm currently trying to rebuild a CSS layout in Flutter Web and I have the problem that the border of my container is too tall.
So my Question would be how to shrink the border?
It should look like this:
But mine looks like this:
My Code:
return…

Kili2108
- 11
- 1
0
votes
3 answers
How to remove any widget from a list and set its state in flutter
Here i am creating an app which contain a section through which a user can create a poll. So when i am pressing a add button options container get added but when i am trying to remove the option container by pressing the minus button it's not…

Rohan Patil
- 91
- 7
0
votes
0 answers
Flutter Container not changing color after Gesture Detector onTap( ) { }
Currently have 7 GestureDetectors and Containers inside a SingleChildScrollView to represent a guitar neck and notes. Inside each container Gesture Detector, I add the item index to a list, and using this list I can cause an item to change color,…

Luke Browne
- 131
- 1
- 7
0
votes
2 answers
How to give animation to container when no height and width is defined
I want to give animation to my container, I want to increase the size from a low width and height of the container up to the default size that it is taking now.
Container(
decoration: BoxDecoration(
…

Praveen Kumar
- 199
- 11
0
votes
1 answer
Flutter Calculator App UI overflowing in most of the devices
I'm working on a calculator UI in flutter. The code that I have written is rendering perfectly fine but the main trouble I'm having after debugging that code is that the calculator UI is not visible in most of the devices which have low screen…
0
votes
0 answers
Adding a GridView widget in a simple layout crashes the flutter application
I have the following flutter code,
class ReportDisasterPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Column(
children: [
…

NewPythoneer
- 93
- 5