@@ -12,6 +12,8 @@ import 'package:flutter/widgets.dart';
12
12
import 'color_scheme.dart' ;
13
13
import 'colors.dart' ;
14
14
import 'constants.dart' ;
15
+ import 'icon_button.dart' ;
16
+ import 'icon_button_theme.dart' ;
15
17
import 'input_border.dart' ;
16
18
import 'material.dart' ;
17
19
import 'material_state.dart' ;
@@ -2307,19 +2309,27 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
2307
2309
cursor: SystemMouseCursors .basic,
2308
2310
child: ConstrainedBox (
2309
2311
constraints: decoration.prefixIconConstraints ??
2310
- themeData.visualDensity.effectiveConstraints (
2311
- const BoxConstraints (
2312
- minWidth: kMinInteractiveDimension,
2313
- minHeight: kMinInteractiveDimension,
2314
- ),
2312
+ themeData.visualDensity.effectiveConstraints (
2313
+ const BoxConstraints (
2314
+ minWidth: kMinInteractiveDimension,
2315
+ minHeight: kMinInteractiveDimension,
2315
2316
),
2317
+ ),
2316
2318
child: IconTheme .merge (
2317
2319
data: IconThemeData (
2318
2320
color: _getPrefixIconColor (themeData, defaults),
2319
2321
size: iconSize,
2320
2322
),
2321
- child: Semantics (
2322
- child: decoration.prefixIcon,
2323
+ child: IconButtonTheme (
2324
+ data: IconButtonThemeData (
2325
+ style: IconButton .styleFrom (
2326
+ foregroundColor: _getPrefixIconColor (themeData, defaults),
2327
+ iconSize: iconSize,
2328
+ ),
2329
+ ),
2330
+ child: Semantics (
2331
+ child: decoration.prefixIcon,
2332
+ ),
2323
2333
),
2324
2334
),
2325
2335
),
@@ -2334,24 +2344,32 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
2334
2344
cursor: SystemMouseCursors .basic,
2335
2345
child: ConstrainedBox (
2336
2346
constraints: decoration.suffixIconConstraints ??
2337
- themeData.visualDensity.effectiveConstraints (
2338
- const BoxConstraints (
2339
- minWidth: kMinInteractiveDimension,
2340
- minHeight: kMinInteractiveDimension,
2341
- ),
2347
+ themeData.visualDensity.effectiveConstraints (
2348
+ const BoxConstraints (
2349
+ minWidth: kMinInteractiveDimension,
2350
+ minHeight: kMinInteractiveDimension,
2342
2351
),
2343
- child: IconTheme .merge (
2344
- data: IconThemeData (
2345
- color: _getSuffixIconColor (themeData, defaults),
2346
- size: iconSize,
2347
2352
),
2348
- child: Semantics (
2349
- child: decoration.suffixIcon,
2353
+ child: IconTheme .merge (
2354
+ data: IconThemeData (
2355
+ color: _getSuffixIconColor (themeData, defaults),
2356
+ size: iconSize,
2357
+ ),
2358
+ child: IconButtonTheme (
2359
+ data: IconButtonThemeData (
2360
+ style: IconButton .styleFrom (
2361
+ foregroundColor: _getSuffixIconColor (themeData, defaults),
2362
+ iconSize: iconSize,
2363
+ ),
2364
+ ),
2365
+ child: Semantics (
2366
+ child: decoration.suffixIcon,
2367
+ ),
2368
+ ),
2350
2369
),
2351
2370
),
2352
2371
),
2353
- ),
2354
- );
2372
+ );
2355
2373
2356
2374
final Widget helperError = _HelperError (
2357
2375
textAlign: textAlign,
0 commit comments