Closed
Description
Steps to Reproduce
- write code using AnimatedSwitcher with conditional render like the following snippets
/// TabBarContent
AnimatedSwitcher(
duration: Duration(milliseconds: 400),
child: [
CourseDetailsIntroduce(
key: ValueKey<String>("details_introduce"),
course: course),
CourseDetailsComment(
key: ValueKey<String>("details_comment"))
][_tabController.index],
),
- The child content of the AnimatedSwitcher is different height, the first one is higher then the second one.
- When switch from tab1 to tab2, then you can see the content of tab2 is appear from bottom to top, not hold its original position.
Expected results:
The content of tab is no moving horizontally.
Actual results:
see the following gif.