-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/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 team
Description
Steps to reproduce
When SliverMainAxisGroup is used in a CustomScrollable with reverse: true then the main axis extent of the last child of the SliverMainAxisGroup (incorrectly) offsets hit testing of the other children.
Perhaps related to #170991, #167801 (Logging this separately as I'm not sure and this deserves it's own widget tests)
Please add any fix as a point release to Flutter 3.32.
Expected results
hit testing works correctly.
Actual results
Tapping on the bottom 40dp of the red box does nothing, while tapping above outside of the red box prints "TAP".
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) => Directionality(
textDirection: TextDirection.ltr,
child: Padding(
padding: const EdgeInsets.all(20.0),
child: CustomScrollView(
reverse: true,
slivers: [
SliverMainAxisGroup(
slivers: [
SliverToBoxAdapter(
child: GestureDetector(
onTap: () {
print("TAP");
},
child: Container(color: Color(0xffff0000), height: 60),
),
),
SliverToBoxAdapter(child: SizedBox(height: 40)),
],
),
],
),
),
);
}
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.32.4, on macOS 15.5 24F74 darwin-arm64, locale en-NL)Also broken on 3.33.0-1.0.pre.559
Was still working on 3.29.3
gabrielgarciagava, PieterAelse and RtgrV
Metadata
Metadata
Assignees
Labels
f: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/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 team