File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4309,7 +4309,7 @@ class InputDecorationTheme with Diagnosticable {
43094309 floatingLabelAlignment: floatingLabelAlignment ?? this .floatingLabelAlignment,
43104310 isDense: isDense ?? this .isDense,
43114311 contentPadding: contentPadding ?? this .contentPadding,
4312- iconColor: iconColor,
4312+ iconColor: iconColor ?? this .iconColor ,
43134313 isCollapsed: isCollapsed ?? this .isCollapsed,
43144314 prefixStyle: prefixStyle ?? this .prefixStyle,
43154315 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
70477047 await tester.pumpAndSettle ();
70487048 expect (getLabelStyle (tester).height, beforeStyle.height);
70497049 });
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+ });
70507062}
You can’t perform that action at this time.
0 commit comments