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
c6f6095a
Unverified
Commit
c6f6095a
authored
Oct 27, 2022
by
chunhtai
Committed by
GitHub
Oct 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove RouteSetting.copyWith (#113860)
parent
f60b44da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
22 deletions
+0
-22
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+0
-12
routes_test.dart
packages/flutter/test/widgets/routes_test.dart
+0
-10
No files found.
packages/flutter/lib/src/widgets/navigator.dart
View file @
c6f6095a
...
...
@@ -537,18 +537,6 @@ class RouteSettings {
this
.
arguments
,
});
/// Creates a copy of this route settings object with the given fields
/// replaced with the new values.
RouteSettings
copyWith
({
String
?
name
,
Object
?
arguments
,
})
{
return
RouteSettings
(
name:
name
??
this
.
name
,
arguments:
arguments
??
this
.
arguments
,
);
}
/// The name of the route (e.g., "/settings").
///
/// If null, the route is anonymous.
...
...
packages/flutter/test/widgets/routes_test.dart
View file @
c6f6095a
...
...
@@ -116,8 +116,6 @@ void main() {
testWidgets
(
'Route settings'
,
(
WidgetTester
tester
)
async
{
const
RouteSettings
settings
=
RouteSettings
(
name:
'A'
);
expect
(
settings
,
hasOneLineDescription
);
final
RouteSettings
settings2
=
settings
.
copyWith
(
name:
'B'
);
expect
(
settings2
.
name
,
'B'
);
});
testWidgets
(
'Route settings arguments'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -127,14 +125,6 @@ void main() {
final
Object
arguments
=
Object
();
final
RouteSettings
settings2
=
RouteSettings
(
name:
'A'
,
arguments:
arguments
);
expect
(
settings2
.
arguments
,
same
(
arguments
));
final
RouteSettings
settings3
=
settings2
.
copyWith
();
expect
(
settings3
.
arguments
,
equals
(
arguments
));
final
Object
arguments2
=
Object
();
final
RouteSettings
settings4
=
settings2
.
copyWith
(
arguments:
arguments2
);
expect
(
settings4
.
arguments
,
same
(
arguments2
));
expect
(
settings4
.
arguments
,
isNot
(
same
(
arguments
)));
});
testWidgets
(
'Route management - push, replace, pop sequence'
,
(
WidgetTester
tester
)
async
{
...
...
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