forked from firka/flutter
Use EdgeInsetsGeometry instead of EdgeInsets (#40775)
This commit is contained in:
committed by
Michael Goderbauer
parent
0b0942a60c
commit
f8310d89e8
@@ -178,7 +178,7 @@ class ShapeDecoration extends Decoration {
|
||||
///
|
||||
/// This value may be misleading. See the discussion at [ShapeBorder.dimensions].
|
||||
@override
|
||||
EdgeInsets get padding => shape.dimensions;
|
||||
EdgeInsetsGeometry get padding => shape.dimensions;
|
||||
|
||||
@override
|
||||
bool get isComplex => shadows != null;
|
||||
|
||||
@@ -61,6 +61,14 @@ Future<void> main() async {
|
||||
);
|
||||
}, 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 {
|
||||
final List<String> log = <String>[];
|
||||
await tester.pumpWidget(
|
||||
|
||||
Reference in New Issue
Block a user