Skip to content

Commit fe34f08

Browse files
committed
fix: replace scrollableBuilder with builder in CupertinoSheetRoute for simplified sheet implementation
1 parent c28ef87 commit fe34f08

1 file changed

Lines changed: 14 additions & 19 deletions

File tree

cupertino_gallery/lib/widgets/sheet_page.dart

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,20 @@ class SheetPage extends StatelessWidget {
1313
onPressed: () {
1414
Navigator.of(context).push(
1515
CupertinoSheetRoute<void>(
16-
scrollableBuilder:
17-
(BuildContext context, ScrollController controller) {
18-
Widget widgetBuilder(BuildContext context) {
19-
return CupertinoPageScaffold(
20-
navigationBar: CupertinoNavigationBar(
21-
middle: const Text('Sheet'),
22-
trailing: GestureDetector(
23-
child: const Icon(CupertinoIcons.xmark),
24-
onTap: () {
25-
Navigator.of(context).pop();
26-
},
27-
),
28-
),
29-
child: const Center(child: Text('This is a sheet')),
30-
);
31-
}
32-
33-
return widgetBuilder(context);
34-
},
16+
builder: (BuildContext context) {
17+
return CupertinoPageScaffold(
18+
navigationBar: CupertinoNavigationBar(
19+
middle: const Text('Sheet'),
20+
trailing: GestureDetector(
21+
child: const Icon(CupertinoIcons.xmark),
22+
onTap: () {
23+
Navigator.of(context).pop();
24+
},
25+
),
26+
),
27+
child: const Center(child: Text('This is a sheet')),
28+
);
29+
},
3530
),
3631
);
3732
},

0 commit comments

Comments
 (0)