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
a4ab0321
Unverified
Commit
a4ab0321
authored
Apr 17, 2019
by
Todd Volkert
Committed by
GitHub
Apr 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Border.uniform() -> Border.fromSide() (#30792)
parent
efe744a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
box_border.dart
packages/flutter/lib/src/painting/box_border.dart
+2
-2
border_test.dart
packages/flutter/test/painting/border_test.dart
+2
-2
No files found.
packages/flutter/lib/src/painting/box_border.dart
View file @
a4ab0321
...
@@ -317,7 +317,7 @@ class Border extends BoxBorder {
...
@@ -317,7 +317,7 @@ class Border extends BoxBorder {
/// Creates a border whose sides are all the same.
/// Creates a border whose sides are all the same.
///
///
/// The `side` argument must not be null.
/// The `side` argument must not be null.
const
Border
.
uniform
(
BorderSide
side
)
const
Border
.
fromBorderSide
(
BorderSide
side
)
:
assert
(
side
!=
null
),
:
assert
(
side
!=
null
),
top
=
side
,
top
=
side
,
right
=
side
,
right
=
side
,
...
@@ -333,7 +333,7 @@ class Border extends BoxBorder {
...
@@ -333,7 +333,7 @@ class Border extends BoxBorder {
BorderStyle
style
=
BorderStyle
.
solid
,
BorderStyle
style
=
BorderStyle
.
solid
,
})
{
})
{
final
BorderSide
side
=
BorderSide
(
color:
color
,
width:
width
,
style:
style
);
final
BorderSide
side
=
BorderSide
(
color:
color
,
width:
width
,
style:
style
);
return
Border
.
uniform
(
side
);
return
Border
.
fromBorderSide
(
side
);
}
}
/// Creates a [Border] that represents the addition of the two given
/// Creates a [Border] that represents the addition of the two given
...
...
packages/flutter/test/painting/border_test.dart
View file @
a4ab0321
...
@@ -14,9 +14,9 @@ void main() {
...
@@ -14,9 +14,9 @@ void main() {
});
});
test
(
'Border.uniform constructor'
,
()
{
test
(
'Border.uniform constructor'
,
()
{
expect
(()
=>
Border
.
uniform
(
null
),
throwsAssertionError
);
expect
(()
=>
Border
.
fromBorderSide
(
null
),
throwsAssertionError
);
const
BorderSide
side
=
BorderSide
();
const
BorderSide
side
=
BorderSide
();
const
Border
border
=
Border
.
uniform
(
side
);
const
Border
border
=
Border
.
fromBorderSide
(
side
);
expect
(
border
.
left
,
same
(
side
));
expect
(
border
.
left
,
same
(
side
));
expect
(
border
.
top
,
same
(
side
));
expect
(
border
.
top
,
same
(
side
));
expect
(
border
.
right
,
same
(
side
));
expect
(
border
.
right
,
same
(
side
));
...
...
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