Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5baebb88
Unverified
Commit
5baebb88
authored
Mar 11, 2021
by
Zomtir
Committed by
GitHub
Mar 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Docs] RouteObserver<PageRoute> cannot subscribe ModalRoute (#77606)
parent
5e7f6690
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+4
-4
No files found.
packages/flutter/lib/src/widgets/routes.dart
View file @
5baebb88
...
@@ -1610,8 +1610,8 @@ abstract class PopupRoute<T> extends ModalRoute<T> {
...
@@ -1610,8 +1610,8 @@ abstract class PopupRoute<T> extends ModalRoute<T> {
/// be given with their type arguments. Since the [Route] class and its
/// be given with their type arguments. Since the [Route] class and its
/// subclasses have a type argument, this includes the arguments passed to this
/// subclasses have a type argument, this includes the arguments passed to this
/// class. Consider using `dynamic` to specify the entire class of routes rather
/// class. Consider using `dynamic` to specify the entire class of routes rather
/// than only specific subtypes. For example, to watch for all [
Page
Route]
/// than only specific subtypes. For example, to watch for all [
Modal
Route]
/// variants, the `RouteObserver<
Page
Route<dynamic>>` type may be used.
/// variants, the `RouteObserver<
Modal
Route<dynamic>>` type may be used.
///
///
/// {@tool snippet}
/// {@tool snippet}
///
///
...
@@ -1620,7 +1620,7 @@ abstract class PopupRoute<T> extends ModalRoute<T> {
...
@@ -1620,7 +1620,7 @@ abstract class PopupRoute<T> extends ModalRoute<T> {
///
///
/// ```dart
/// ```dart
/// // Register the RouteObserver as a navigation observer.
/// // Register the RouteObserver as a navigation observer.
/// final RouteObserver<
PageRoute> routeObserver = RouteObserver<Page
Route>();
/// final RouteObserver<
ModalRoute> routeObserver = RouteObserver<Modal
Route>();
/// void main() {
/// void main() {
/// runApp(MaterialApp(
/// runApp(MaterialApp(
/// home: Container(),
/// home: Container(),
...
@@ -1638,7 +1638,7 @@ abstract class PopupRoute<T> extends ModalRoute<T> {
...
@@ -1638,7 +1638,7 @@ abstract class PopupRoute<T> extends ModalRoute<T> {
/// @override
/// @override
/// void didChangeDependencies() {
/// void didChangeDependencies() {
/// super.didChangeDependencies();
/// super.didChangeDependencies();
/// routeObserver.subscribe(this, ModalRoute.of(context));
/// routeObserver.subscribe(this, ModalRoute.of(context)
!
);
/// }
/// }
///
///
/// @override
/// @override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment