Commit 1df28e8b authored by ocavue's avatar ocavue Committed by Hans Muller

Fix ink highlight effect of RawChip (#28653)

parent 604e9dc6
......@@ -1625,10 +1625,11 @@ class _RawChipState extends State<RawChip> with TickerProviderStateMixin<RawChip
animationDuration: pressedAnimationDuration,
shape: shape,
clipBehavior: widget.clipBehavior,
child: InkResponse(
child: InkWell(
onTap: canTap ? _handleTap : null,
onTapDown: canTap ? _handleTapDown : null,
onTapCancel: canTap ? _handleTapCancel : null,
customBorder: shape,
child: AnimatedBuilder(
animation: Listenable.merge(<Listenable>[selectController, enableController]),
builder: (BuildContext context, Widget child) {
......
......@@ -1649,4 +1649,19 @@ void main() {
const Offset(4, 4),
]));
});
testWidgets('Chips should use InkWell instead of InkResponse.', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/28646
await tester.pumpWidget(
MaterialApp(
home: Material(
child: ActionChip(
onPressed: (){},
label: const Text('action chip'),
),
),
),
);
expect(find.byType(InkWell), findsOneWidget);
});
}
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