-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.6Found to occur in 3.6Found to occur in 3.6frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
- Execute
flutter run
on the code sample - Compare the width of the colored boxes
Expected results:
The red box (AnimatedList) should not be visible
Actual results:
The red box (AnimatedList) is visible and occupies a part of the Row.
The regression was caused by commit #113793.
#113793 was only supposed to be a refactor, so something must have gone wrong because the behavior changed.
Before #113793 (Expected)
Code sample
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Home(),
);
}
}
class Home extends StatefulWidget {
const Home({Key key}) : super(key: key);
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Container(
height: 44,
color: Colors.blue,
child: Row(
children: [
Container(
color: Colors.red,
constraints: BoxConstraints(
minWidth: 0,
maxWidth: 300,
),
child: AnimatedList(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemBuilder: (context, index, animation) {
return SizedBox.shrink();
},
initialItemCount: 0,
),
),
Expanded(
child: Container(
color: Colors.purple,
),
)
],
),
),
),
);
}
}
Logs
Flutter (Channel master, 3.5.0-12.0.pre.164, on macOS 12.6 21G115 darwin-arm64, locale en-US)
Metadata
Metadata
Assignees
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.6Found to occur in 3.6Found to occur in 3.6frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version