-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.23Found to occur in 3.23Found to occur in 3.23frameworkflutter/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 versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Steps to reproduce
- Run the sample code
- Scroll the horizontal list view
Expected results
Should be able to scroll horizontally.
Actual results
Doesn't scroll and the scroll bar for the vertical list view is highlighted. This issue happens on both iOS and web but only happens when I'm using trackpad.
Code sample
Code sample
import 'package:flutter/material.dart';
/// Flutter code sample for [Carousel].
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: const Text('Carousel Sample'),
),
body: const Example(),
),
);
}
}
class Example extends StatefulWidget {
const Example({super.key});
@override
State<Example> createState() => _ExampleState();
}
class _ExampleState extends State<Example> {
@override
Widget build(BuildContext context) {
return ListView(
children: <Widget>[
Container(
width: 200,
height: 200,
color: Colors.amber[50],
),
Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxHeight: 200),
child: ListView(
scrollDirection: Axis.horizontal,
children: List.generate(20, (int index) {
return ConstrainedBox(constraints: BoxConstraints.tightFor(width: 200), child: Card.outlined(child: SizedBox(width: 200, height: 200, child: Center(child: Text('Item $index')),),),);
}),
)
),
),
Container(
width: 200,
height: 200,
color: Colors.amber[100],
),
Container(
width: 200,
height: 200,
color: Colors.amber[200],
),
],
);
}
}
Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2024-06-13.at.4.00.09.PM.mov
Might be related to #146654
CC: @HansMuller
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.23Found to occur in 3.23Found to occur in 3.23frameworkflutter/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 versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team