From a4ab0321adbdf9243dbf4d3bc8e409971f4539b6 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Wed, 17 Apr 2019 10:58:42 -0700 Subject: [PATCH] Rename Border.uniform() -> Border.fromSide() (#30792) --- packages/flutter/lib/src/painting/box_border.dart | 4 ++-- packages/flutter/test/painting/border_test.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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));