File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4309,7 +4309,7 @@ class InputDecorationTheme with Diagnosticable {
4309
4309
floatingLabelAlignment: floatingLabelAlignment ?? this .floatingLabelAlignment,
4310
4310
isDense: isDense ?? this .isDense,
4311
4311
contentPadding: contentPadding ?? this .contentPadding,
4312
- iconColor: iconColor,
4312
+ iconColor: iconColor ?? this .iconColor ,
4313
4313
isCollapsed: isCollapsed ?? this .isCollapsed,
4314
4314
prefixStyle: prefixStyle ?? this .prefixStyle,
4315
4315
prefixIconColor: prefixIconColor ?? this .prefixIconColor,
Original file line number Diff line number Diff line change @@ -7047,4 +7047,16 @@ testWidgets('OutlineInputBorder with BorderRadius.zero should draw a rectangular
7047
7047
await tester.pumpAndSettle ();
7048
7048
expect (getLabelStyle (tester).height, beforeStyle.height);
7049
7049
});
7050
+
7051
+ test ('InputDecorationTheme.copyWith keeps original iconColor.' , () async {
7052
+ const InputDecorationTheme original = InputDecorationTheme (iconColor: Color (0xDEADBEEF ));
7053
+ expect (original.iconColor, const Color (0xDEADBEEF ));
7054
+ expect (original.fillColor, isNot (const Color (0xDEADCAFE )));
7055
+ final InputDecorationTheme copy1 = original.copyWith (fillColor: const Color (0xDEADCAFE ));
7056
+ expect (copy1.iconColor, const Color (0xDEADBEEF ));
7057
+ expect (copy1.fillColor, const Color (0xDEADCAFE ));
7058
+ final InputDecorationTheme copy2 = original.copyWith (iconColor: const Color (0xDEADCAFE ));
7059
+ expect (copy2.iconColor, const Color (0xDEADCAFE ));
7060
+ expect (copy2.fillColor, isNot (const Color (0xDEADCAFE )));
7061
+ });
7050
7062
}
You can’t perform that action at this time.
0 commit comments