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
a3e0b0ae
Unverified
Commit
a3e0b0ae
authored
Oct 23, 2018
by
Yegor
Committed by
GitHub
Oct 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make LocalHistoryRoute a proper super-mixin (#23382)
parent
1f72406b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+3
-5
routes_test.dart
packages/flutter/test/widgets/routes_test.dart
+1
-1
No files found.
packages/flutter/lib/src/widgets/routes.dart
View file @
a3e0b0ae
...
...
@@ -306,16 +306,14 @@ class LocalHistoryEntry {
}
}
/// A
route that can
handle back navigations internally by popping a list.
/// A
mixin used by routes to
handle back navigations internally by popping a list.
///
/// When a [Navigator] is instructed to pop, the current route is given an
/// opportunity to handle the pop internally. A
LocalHistoryRoute
handles the
/// opportunity to handle the pop internally. A
`LocalHistoryRoute`
handles the
/// pop internally if its list of local history entries is non-empty. Rather
/// than being removed as the current route, the most recent [LocalHistoryEntry]
/// is removed from the list and its [LocalHistoryEntry.onRemove] is called.
///
/// This class is typically used as a mixin.
abstract
class
LocalHistoryRoute
<
T
>
extends
Route
<
T
>
{
mixin
LocalHistoryRoute
<
T
>
on
Route
<
T
>
{
List
<
LocalHistoryEntry
>
_localHistory
;
/// Adds a local history entry to this route.
...
...
packages/flutter/test/widgets/routes_test.dart
View file @
a3e0b0ae
...
...
@@ -12,7 +12,7 @@ final List<String> results = <String>[];
Set
<
TestRoute
>
routes
=
HashSet
<
TestRoute
>();
class
TestRoute
extends
LocalHistoryRoute
<
String
>
{
class
TestRoute
extends
Route
<
String
>
with
LocalHistoryRoute
<
String
>
{
TestRoute
(
this
.
name
);
final
String
name
;
...
...
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