Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/cookbook/design/cupertino_sheets/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class CupertinoSheetPage extends StatelessWidget {
// #docregion ShowCupertinoSheet
showCupertinoSheet(
context: context,
builder: (context) {
scrollableBuilder: (context, scrollController) {
return SingleChildScrollView(
controller: scrollController,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
8 changes: 5 additions & 3 deletions sites/docs/src/content/cookbook/design/cupertino-sheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ class CupertinoSheetDemo extends StatelessWidget {
## 2. Display the sheet content

With the basic app structure in place, display the sheet.
To show it, call `showCupertinoSheet` and provide a `builder`
To show it, call `showCupertinoSheet` and provide a `scrollableBuilder`
that returns the content for the sheet, such as a `SingleChildScrollView`.

<?code-excerpt "lib/main.dart (ShowCupertinoSheet)"?>
```dart
showCupertinoSheet(
context: context,
builder: (context) {
scrollableBuilder: (context, scrollController) {
return SingleChildScrollView(
controller: scrollController,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down Expand Up @@ -107,8 +108,9 @@ class CupertinoSheetPage extends StatelessWidget {
onPressed: () {
showCupertinoSheet(
context: context,
builder: (context) {
scrollableBuilder: (context, scrollController) {
return SingleChildScrollView(
controller: scrollController,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
Loading