Questions tagged [animatedcontainer]
24 questions
2
votes
1 answer
Flutter: Animating Row contents within a stateless widget
I have a Row that is made out of either one or two elements. Depending on the latter, I want to animate the width of the first element to either be fully expanded, or to accommodate for the second element.
I am using AnimatedContainers within the…

Jacobo Koenig
- 11,728
- 9
- 40
- 75
2
votes
2 answers
How to make an AnimatedContainer change height after intial widget build, instead of on Button Click
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.only(bottom: 3.0, right: 1),
child: AnimatedContainer(
duration:…

Anshuman Komawar
- 55
- 2
- 6
2
votes
3 answers
Flutter AnimatedContainer vs AnimationController
I can't find the difference between the two, and why you would want to use one above the other.
The way I see it, both of them pretty much does the same thing.
Why and where would you use one above the other?

Ruan
- 3,969
- 10
- 60
- 87
1
vote
0 answers
Flutter disable animation for AnimatedContainer while changing theme brightness
If you use brightness dependent color inside the AnimatedContainer(for example Theme.of(context).colorScheme.onBackground, which is white for dark theme and black for light theme) and change app brightness then AnimatedContainer additionally…

Kirill
- 1,129
- 1
- 7
- 16
1
vote
2 answers
Flutter AnimatedContainer oval decoration instead of circle
I have a problem with the an AnimatedContainer.
I cant make is circular. I only get an oval shape. Is there a way to make it a circular?
I increased the borderRadius but nothing changes. Any suggestions?
AnimatedContainer(
duration:…

MarsMan
- 21
- 8
1
vote
2 answers
How to dynamically change container size based on text inside?
I'm displaying a list of Animated Containers which originally has a certain maxLines of text. When the user clicks on the container, I want the container to expand to perfectly fit the entire text
Here's my simplified code:
AnimatedContainer(
…

zinbrox
- 103
- 1
- 7
1
vote
3 answers
Animated Container with dynamix height Flutter
I am using an animatedContainer to reveal a listView.builder() when a button is pressed. It's a simple sublist to show, but the problem is the height of the ListView builder is not known by me to pass to animatedContainer height Constraint. Do there…

MBK
- 2,589
- 21
- 25
1
vote
2 answers
How to use Flutter AnimatedContainer with height matching child
Currently this code works to resize a container to toggle between different content, but it's not animating. I think that I need to provide a height property to make the animation work, and when I do provide a height to toggle between it does match,…

IIW
- 11
- 2
1
vote
0 answers
Sizing images in a vertical pageview without compromising the space between each element?
Hello all I am having an issue with resizing an animated container in a pageview. If i resize the image I lose the amount of space in between and if I right a conditional statement to check if the container is an activePage if not higher the other…

Isis Curiel
- 160
- 2
- 14
1
vote
1 answer
Flutter - Curved Navigation Bar - draw outside of the screen
I'm using curved_navigation_bar : this one
I have an animatedContainer that shrink to 1/4 of its size, and it has an Curved Navigation Bar,
when the Container shrinks the navigation bar draws a little bit outside of the container, I need a way to…

Lidor Eliyahu Shelef
- 1,299
- 1
- 14
- 35
1
vote
0 answers
Unable to render BorderRadius inside Animated Container
I am trying to render circular borderRadius inside animated container. It renders on a Container's shadow but not on the actual container. any Suggestions?
Here's my code:
Main.dart
void main() {
runApp(MyApp());
}
class MyApp extends…

orynnnnn
- 101
- 3
- 13
1
vote
0 answers
How to animate height of the container relative to its children content?
I want to animate the height property of the container (AnimatedContainer in code below), but I don't want to set hard numbers like this (height: _visible2 ? 160 : 40.9) because height of this container is otherwise relative to its children content…

Valeriy
- 11
- 2
1
vote
1 answer
Icons still showing even if it's parent widget's height is zero in Flutter
I have an AnimatedContainer and as it's child, I have a Row containing a Text and an IconButton. After clicking some button, I am toggling the height of the Container between 0 and 100. When the Container height is zero, the IconButton is still…

B.Ahmad
- 107
- 1
- 8
0
votes
1 answer
Flutter: Make a custom bottom sheet height adjust according to content
I am trying to create a draggable bottom sheet that can be expanded or collapsed by the user. Additionally, the user should be able to temporarily collapse the sheet by holding and swiping it.
The code I have so far works well, except for one issue:…

Denis
- 17
- 4
0
votes
1 answer
Animated Container does not animate when changing flex value of parent widget "Expanded"
bool left = true;
Row(
children: [
Expanded(
flex: left? 1: 0,
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
color: Colors.red,
child: Text('Left Box'),
),
),
Expanded(
flex: left? 0: 1,
child: AnimatedContainer(
duration:…

Salah eddine Naoushi
- 85
- 1
- 2
- 9