Unverified Commit a4ab0321 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Rename Border.uniform() -> Border.fromSide() (#30792)

parent efe744a3
...@@ -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
......
...@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment