Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update returning-data.md #11275

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions src/content/cookbook/navigation/returning-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ it launches the selection screen.

<?code-excerpt "lib/main_step2.dart (HomeScreen)"?>
```dart

class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});

Expand Down Expand Up @@ -56,6 +57,7 @@ Now, create the SelectionButton, which does the following:

<?code-excerpt "lib/main_step2.dart (SelectionButton)"?>
```dart

class SelectionButton extends StatefulWidget {
const SelectionButton({super.key});

Expand Down Expand Up @@ -84,7 +86,7 @@ class _SelectionButtonState extends State<SelectionButton> {
);
}
}
```
```dart

## 3. Show the selection screen with two buttons

Expand Down Expand Up @@ -135,7 +137,7 @@ class SelectionScreen extends StatelessWidget {
);
}
}
```
```dart

## 4. When a button is tapped, close the selection screen

Expand Down Expand Up @@ -313,7 +315,7 @@ class SelectionScreen extends StatelessWidget {
);
}
}
```
```dart

<noscript>
<img src="/assets/images/docs/cookbook/returning-data.gif" alt="Returning data demo" class="site-mobile-screenshot" />
Expand Down