Unverified Commit 9a3b9f62 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Fix `DropdownButton` Inkwell border radius (#106657)

parent 427aecc5
......@@ -1509,6 +1509,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> 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,
......
......@@ -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<String>)));
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();
......
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