Commit f8310d89 authored by Ori Schwartz's avatar Ori Schwartz Committed by Michael Goderbauer

Use EdgeInsetsGeometry instead of EdgeInsets (#40775)

parent 0b0942a6
...@@ -178,7 +178,7 @@ class ShapeDecoration extends Decoration { ...@@ -178,7 +178,7 @@ class ShapeDecoration extends Decoration {
/// ///
/// This value may be misleading. See the discussion at [ShapeBorder.dimensions]. /// This value may be misleading. See the discussion at [ShapeBorder.dimensions].
@override @override
EdgeInsets get padding => shape.dimensions; EdgeInsetsGeometry get padding => shape.dimensions;
@override @override
bool get isComplex => shadows != null; bool get isComplex => shadows != null;
......
...@@ -61,6 +61,14 @@ Future<void> main() async { ...@@ -61,6 +61,14 @@ Future<void> main() async {
); );
}, skip: isBrowser); }, skip: isBrowser);
test('ShapeDecoration with BorderDirectional', () {
const ShapeDecoration decoration = ShapeDecoration(
shape: BorderDirectional(start: BorderSide(color: Colors.red, width: 3)),
);
expect(decoration.padding, isInstanceOf<EdgeInsetsDirectional>());
});
testWidgets('TestBorder and Directionality - 1', (WidgetTester tester) async { testWidgets('TestBorder and Directionality - 1', (WidgetTester tester) async {
final List<String> log = <String>[]; final List<String> log = <String>[];
await tester.pumpWidget( await tester.pumpWidget(
......
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