-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lifecycle aware Presenters (#1282)
This PR adds a new `Lifecycle` interface, which presenters and UI can observe to know when they are 'paused'. The API is rudimentary at the moment and will change before this is ready to land. A bundled `PauseablePresenter` class can be extended, enabling clients to automatically add pausing ability to their presenters. This impl will simply return the last emitted `UiState` when the presenter is paused. Again, name TBD. ### Other things: - `GestureNavigationRetainedStateTest` and `GestureNavigationSaveableStateTest` have been combined into a parameterized `GestureNavigationStateTest`. This new test also now tests `CupertinoGestureNavigationDecoration` so we get extra coverage. - Changed `rememberRetained`'s `key` param to `Any` to be consistent with all of the other `remember` functions. ### TODO: - [x] Saveable is currently broken by these changes. This needs to be fixed before landing. - [x] Remove all of the logging code. - [x] Add comments - [x] Fix the last remaining failing test
- Loading branch information
1 parent
9e7d982
commit bb09273
Showing
12 changed files
with
392 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.