diff --git a/packages/flutter/lib/src/material/dropdown.dart b/packages/flutter/lib/src/material/dropdown.dart index 4143a01f4d6e..a5f1b41ae605 100644 --- a/packages/flutter/lib/src/material/dropdown.dart +++ b/packages/flutter/lib/src/material/dropdown.dart @@ -1509,6 +1509,7 @@ class _DropdownButtonState extends State> with WidgetsBindi mouseCursor: effectiveMouseCursor, onTap: _enabled ? _handleTap : null, canRequestFocus: _enabled, + borderRadius: widget.borderRadius, focusNode: focusNode, autofocus: widget.autofocus, focusColor: widget.focusColor ?? Theme.of(context).focusColor, diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index cd71406c9f75..23b0c0188ae2 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -3810,7 +3810,7 @@ void main() { expect(tester.getBottomRight(find.text(hintText)).dy, 350.0); }); - testWidgets('BorderRadius property clips dropdown menu', (WidgetTester tester) async { + testWidgets('BorderRadius property clips dropdown button and dropdown menu', (WidgetTester tester) async { const double radius = 20.0; await tester.pumpWidget( @@ -3834,6 +3834,14 @@ void main() { ), ); + final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse); + await gesture.addPointer(); + await gesture.moveTo(tester.getCenter(find.byType(DropdownButtonFormField))); + await tester.pumpAndSettle(); + + final RenderObject inkFeatures = tester.allRenderObjects.firstWhere((RenderObject object) => object.runtimeType.toString() == '_RenderInkFeatures'); + expect(inkFeatures, paints..rrect(rrect: RRect.fromLTRBR(0.0, 276.0, 800.0, 324.0, const Radius.circular(radius)))); + await tester.tap(find.text('One')); await tester.pumpAndSettle();