Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
modal_bottom_sheet
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jaime Blasco
2020-04-07 23:54:27 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2020-04-07 23:54:27 +0200
Commit
b7ba5b3e972c59950ecfc402c754630ef6ca6afe
b7ba5b3e
1 parent
c604733c
Update README.md
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
README.md
README.md
View file @
b7ba5b3
...
...
@@ -74,7 +74,7 @@ Notice this route type behaves the same as `MaterialPageRoute` and supports cust
How can I change my route class? See cases:
1. Using `Navigator.of(context).push`
<details><summary> 1. Using Navigator.of(context).push </summary>
```
dart
Navigator.of(context).push(MaterialPageRoute(builder: (context) => Container()));
`
...
...
@@ -83,7 +83,14 @@ Navigator.of(context).push(MaterialPageRoute(builder: (context) => Container()))
```
dart
Navigator.of(context).push(MaterialWithModalsPageRoute(builder: (context) => Container()));
```
2. Using `onGenerateRoute` parameter of `MaterialApp`, `CupertinoApp` or `Navigator`
</details>
<details><summary>
2.
Using `onGenerateRoute` parameter of `MaterialApp`, `CupertinoApp` or `Navigator`
</summary>
```
dart
onGenerateRoute: (settings) {
...
...
...
@@ -97,13 +104,30 @@ Navigator.of(context).push(MaterialPageRoute(builder: (context) => Container()))
return MaterialWithModalsPageRoute(settings: settings, builder: (context) => Container());
},
```
3. Using `pageRouteBuilder` parameter of `WidgetApp`
</details>
<details><summary>
3.
Using `pageRouteBuilder` parameter of `WidgetApp`
</summary>
```
dart
pageRouteBuilder:
<T>
(RouteSettings settings, WidgetBuilder builder) => MaterialWithModalsPageRoute
<T>
(settings: settings, builder: builder)
```
4. Using `routes` parameter from `MaterialApp` or `CupertinoApp`
</details>
<details>
<summary>
4.
Using `routes` parameter from `MaterialApp` or `CupertinoApp`
</summary>
Unfortunately this routes are `MaterialPageRoute` and `CupertinoPageRoute` respectively and cannot be changes.
You can change the way you call the previous route with one of the previous methods or try option 2
</details>
### OPTION 2.
...
...
Please
register
or
login
to post a comment