Fix chips use square delete button InkWell shape instead of circular (#144319)
fixes [Chips delete button hover style is square, not circular](https://github.com/flutter/flutter/issues/141335) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: RawChip( label: const Text('Test'), onPressed: null, deleteIcon: const Icon(Icons.clear, size: 18), onDeleted: () {}, ), ), ), ); } } ``` </details> ### Preview | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/c5d62c57-97b3-4f94-b83d-df13559ee3a8" /> | <img src="https://github.com/flutter/flutter/assets/48603081/b76edaab-73e0-4aa9-8ca2-127eedd77814" /> |
This commit is contained in:
@@ -1191,6 +1191,7 @@ class _RawChipState extends State<RawChip> with MaterialStateMixin, TickerProvid
|
||||
radius: (_kChipHeight + (widget.padding?.vertical ?? 0.0)) * .45,
|
||||
// Keeps the splash from being constrained to the icon alone.
|
||||
splashFactory: _UnconstrainedInkSplashFactory(Theme.of(context).splashFactory),
|
||||
customBorder: const CircleBorder(),
|
||||
onTap: widget.isEnabled ? widget.onDeleted : null,
|
||||
child: IconTheme(
|
||||
data: theme.iconTheme.copyWith(
|
||||
|
||||
Reference in New Issue
Block a user