Repository navigation
Improve page.dart documentation - #51748
bernaferrari wants to merge 1 commit into
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| /// [maintainState] to false. | ||
| /// remains in memory. To free resources when this is not necessary, set | ||
| /// [maintainState] to false. When [maintainState] is false, it stills maintains | ||
| /// the first, and only the first, route in memory. Use [Navigator.pushReplacement] |
There was a problem hiding this comment.
This statement sounds misleading. When maintainState is set to false on a particular route, other routes below it may still be kept in memory (e.g. because they may have maintainState set to true). And even if this route has maintainState set to false and is not the topmost route it may be kept in memory when the route above it is not opaque. See also https://master-api.flutter.dev/flutter/widgets/OverlayEntry/maintainState.html.
| /// remains in memory. To free resources when this is not necessary, set | ||
| /// [maintainState] to false. When [maintainState] is false, it stills maintains | ||
| /// the first, and only the first, route in memory. Use [Navigator.pushReplacement] | ||
| /// to free every route from memory. |
There was a problem hiding this comment.
How can one use pushReplacement to free every route from memory? And why is it desirable to even do this? You'd be left with a blank screen.
Piinks
left a comment
There was a problem hiding this comment.
Hey @bernaferrari are you planning to come back to work on this some more? :)
|
Yes, no, maybe. I actually don't know how to improve on what was commented :( |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Description
Possible documentation fix for: #44836
I'm open to discussions.
Related Issues
#44836