diff --git a/packages/flutter/lib/src/painting/box_border.dart b/packages/flutter/lib/src/painting/box_border.dart index 375013b4f7..a6c082a249 100644 --- a/packages/flutter/lib/src/painting/box_border.dart +++ b/packages/flutter/lib/src/painting/box_border.dart @@ -317,7 +317,7 @@ class Border extends BoxBorder { /// Creates a border whose sides are all the same. /// /// The `side` argument must not be null. - const Border.uniform(BorderSide side) + const Border.fromBorderSide(BorderSide side) : assert(side != null), top = side, right = side, @@ -333,7 +333,7 @@ class Border extends BoxBorder { BorderStyle style = BorderStyle.solid, }) { 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 diff --git a/packages/flutter/test/painting/border_test.dart b/packages/flutter/test/painting/border_test.dart index 7e7a42e99b..d662556a9d 100644 --- a/packages/flutter/test/painting/border_test.dart +++ b/packages/flutter/test/painting/border_test.dart @@ -14,9 +14,9 @@ void main() { }); test('Border.uniform constructor', () { - expect(() => Border.uniform(null), throwsAssertionError); + expect(() => Border.fromBorderSide(null), throwsAssertionError); const BorderSide side = BorderSide(); - const Border border = Border.uniform(side); + const Border border = Border.fromBorderSide(side); expect(border.left, same(side)); expect(border.top, same(side)); expect(border.right, same(side));