Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Commit

Permalink
Replace broken (possibly old?) Step flutter#4
Browse files Browse the repository at this point in the history
Replace broken (possibly old?) Step flutter#4 with a correct version from the completed example.
I've tested the completed example in Android Studio and it runs with no errors.
  • Loading branch information
chonghorizons authored Nov 6, 2019
1 parent 5e57b0a commit 49124fd
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/docs/cookbook/navigation/navigate-with-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,23 @@ RaisedButton(
onPressed: () {
// When the user taps the button, navigate to the specific route
// and provide the arguments as part of the RouteSettings.
Navigator.pushNamed(
Navigator.push(
context,
ExtractArgumentsScreen.routeName,
arguments: ScreenArguments(
'Extract Arguments Screen',
'This message is extracted in the build method.',
MaterialPageRoute(
builder: (context) => ExtractArgumentsScreen(),
// Pass the arguments as part of the RouteSettings. The
// ExtractArgumentScreen reads the arguments from these
// settings.
settings: RouteSettings(
arguments: ScreenArguments(
'Extract Arguments Screen',
'This message is extracted in the build method.',
),
),
),
);
},
);
)
```

## Alternatively, extract the arguments using `onGenerateRoute`
Expand Down

0 comments on commit 49124fd

Please sign in to comment.