Taha Tesser
7c72a089e1
Fix InputDecorator suffix and prefix IconButtons ignore IconButtonTheme (#145473)
fixes [DropdownMenu TrailingIcon can't be styled through providing an IconButtonTheme](https://github.com/flutter/flutter/issues/145081)
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: IconButtonTheme(
data: IconButtonThemeData(
style: IconButton.styleFrom(
foregroundColor: const Color(0xffff0000),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
),
),
child: SizedBox(
width: 300,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text('IconButton'),
IconButton(onPressed: () {}, icon: const Icon(Icons.search)),
const Text('TextField'),
TextField(
decoration: InputDecoration(
prefixIcon: IconButton(
onPressed: () {},
icon: const Icon(Icons.search),
),
suffixIcon: IconButton(
onPressed: () {},
icon: const Icon(Icons.search),
),
),
),
],
),
),
),
),
),
);
}
}
```
</details>
| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/69b5966b-c95d-4934-b867-3262d1377f70" /> | <img src="https://github.com/flutter/flutter/assets/48603081/0064db2b-0379-4424-a5bf-39bdc5441fe8" /> |
2024-04-04 19:20:30 +00:00
..
2024-02-28 13:55:50 -08:00
2024-03-24 18:01:17 +00:00
2024-03-28 01:20:55 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-25 08:39:05 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-01 12:44:29 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-04-03 03:11:04 +00:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-03-24 18:01:17 +00:00
2024-04-03 15:54:34 +00:00
2024-04-01 09:42:51 +00:00
2024-04-01 09:42:51 +00:00
2024-02-29 15:16:53 -08:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-18 21:32:22 +00:00
2024-04-02 17:27:26 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-26 18:36:09 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-12 16:51:51 +00:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-18 12:45:22 +00:00
2024-03-18 12:45:22 +00:00
2024-03-18 12:45:22 +00:00
2024-03-12 16:51:51 +00:00
2024-04-04 19:20:30 +00:00
2024-03-19 17:58:16 +00:00
2024-03-19 17:58:16 +00:00
2024-04-03 15:49:38 -07:00
2024-03-19 17:58:13 +00:00
2024-04-02 17:27:26 +00:00
2024-04-02 17:27:26 +00:00
2024-03-11 23:04:57 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-13 18:07:59 +00:00
2024-03-27 16:43:10 -07:00
2024-03-28 01:20:55 +00:00
2024-03-19 17:58:13 +00:00
2024-03-27 16:43:10 -07:00
2024-03-28 22:22:20 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-25 08:39:05 +00:00
2024-03-13 16:31:50 +00:00
2024-03-19 17:58:13 +00:00
2024-03-25 22:58:11 +00:00
2024-03-19 17:58:13 +00:00
2024-04-03 16:16:52 +00:00
2024-03-09 07:50:23 +00:00
2024-03-19 17:58:13 +00:00
2024-03-06 20:41:04 +00:00
2024-03-28 01:20:55 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-24 18:01:17 +00:00
2024-03-28 17:56:09 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-07 07:19:26 +00:00
2024-03-01 06:40:47 +00:00
2024-03-06 20:41:04 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-18 21:32:22 +00:00
2024-03-28 01:20:55 +00:00