-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Right now when a vertical scrolling list in in the body of the sheet view, the vertical gesture is blocked by the CupertinoSheetRoute. Priority should be given to the nested scroll rather than the sheet.
Code sample
Code sample
import 'package:flutter/cupertino.dart';
void main() {
runApp(const CupertinoSheetApp());
}
class CupertinoSheetApp extends StatelessWidget {
const CupertinoSheetApp({super.key});
@override
Widget build(BuildContext context) {
return const CupertinoApp(
title: 'Cupertino Sheet',
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
// navigationBar: const CupertinoNavigationBar(
// middle: Text('Sheet Example'),
// automaticBackgroundVisibility: false,
// ),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CupertinoButton.filled(
onPressed: () {
showCupertinoSheet<void>(
context: context,
pageBuilder: (BuildContext context) => const SheetScaffold(),
);
},
child: const Text('Open Bottom Sheet'),
),
],
),
),
);
}
}
class SheetScaffold extends StatelessWidget {
const SheetScaffold({super.key});
@override
Widget build(BuildContext context) {
return const CupertinoPageScaffold(
child: SheetBody(title: 'CupertinoSheetRoute'));
}
}
class SheetBody extends StatelessWidget {
const SheetBody({
super.key,
required this.title,
});
final String title;
@override
Widget build(BuildContext context) {
return ListView(
hitTestBehavior: HitTestBehavior.opaque,
children: [
Text(title),
Container(
color: CupertinoColors.activeBlue,
width: double.infinity,
height: 300,
),
Container(
color: CupertinoColors.activeGreen,
width: double.infinity,
height: 300,
),
Container(
color: CupertinoColors.activeOrange,
width: double.infinity,
height: 300,
),
],
);
}
}
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team