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-06-14 09:17:30 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2020-06-14 09:17:30 +0200
Commit
b82a0c5393942b24a3f9ba2c6b09e0ec326e257e
b82a0c53
1 parent
8710bbdb
Update README.md
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
README.md
README.md
View file @
b82a0c5
...
...
@@ -78,15 +78,17 @@ Useful if you want a blurred transparent background as the example Cupertino Pho
> **Why?**
> `MaterialPageRoute` and `CupertinoPageRoute` do not allow animated translation to/from routes that are not the same type.
There are two options:
### OPTION 1. Recommended.
Replace your current route class with `MaterialWithModalsPageRoute`.
Notice this route type behaves the same as `MaterialPageRoute` and supports custom `PageTransitionsBuilder` and `PageTransitionsTheme`.
How can I change my route class? See cases:
<details><summary>
How can I replace my current route? </summary>
<details><summary> 1.
...
...
@@ -145,9 +147,12 @@ Unfortunately this parameter uses `MaterialPageRoute` and `CupertinoPageRoute` r
You can modify the way you call the previous route with one of the previous methods or try option 2
</details>
</details>
Is there an alternative in case I can't change my current route? **Yes!**
<details><summary>
Learn how to animate previous route with CupertinoScaffold: </summary>
### OPTION 2.
1. Wrap previous route inside a `CupertinoScaffold`.
Example with `routes` parameter from `MaterialApp` or `CupertinoApp`
...
...
@@ -162,7 +167,9 @@ You can modify the way you call the previous route with one of the previous meth
CupertinoScaffold.showCupertinoModalBottomSheet(context:context, builder: (context) => Container())
```
These two options won't work correctly together.
Don't use this solution at the same time as
`MaterialWithModalsPageRoute`
</details>
It supports native features as bouncing, blurred background, dark mode, stacking modals and inside navigation.
...
...
Please
register
or
login
to post a comment