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
96553115
Unverified
Commit
96553115
authored
Aug 08, 2023
by
Justin McCandless
Committed by
GitHub
Aug 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Iterator from _History (#132101)
Cleaning up private code in Navigator.
parent
e60dc301
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+1
-16
No files found.
packages/flutter/lib/src/widgets/navigator.dart
View file @
96553115
...
...
@@ -3354,7 +3354,7 @@ typedef _IndexWhereCallback = bool Function(_RouteEntry element);
///
/// Acts as a ChangeNotifier and notifies after its List of _RouteEntries is
/// mutated.
class
_History
extends
Iterable
<
_RouteEntry
>
with
ChangeNotifier
implements
Iterator
<
_RouteEntry
>
{
class
_History
extends
Iterable
<
_RouteEntry
>
with
ChangeNotifier
{
final
List
<
_RouteEntry
>
_value
=
<
_RouteEntry
>[];
int
indexWhere
(
_IndexWhereCallback
test
,
[
int
start
=
0
])
{
...
...
@@ -3398,10 +3398,6 @@ class _History extends Iterable<_RouteEntry> with ChangeNotifier implements Iter
return
entry
;
}
// Begin Iterator.
int
_i
=
0
;
_RouteEntry
operator
[](
int
index
)
{
return
_value
[
index
];
}
...
...
@@ -3411,17 +3407,6 @@ class _History extends Iterable<_RouteEntry> with ChangeNotifier implements Iter
return
_value
.
iterator
;
}
@override
_RouteEntry
get
current
=>
_value
[
_i
];
@override
bool
moveNext
()
{
_i
++;
return
_i
<=
_value
.
length
-
1
;
}
// End Iterator.
@override
String
toString
()
{
return
_value
.
toString
();
...
...
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