@@ -700,6 +700,65 @@ void main() {
700700 await tester.pumpAndSettle ();
701701 expect (iconColor (leadingKey), selectedColor);
702702 });
703+
704+ testWidgets ('ListTileThemeData copyWith overrides all properties' , (WidgetTester tester) async {
705+ // This is a regression test for https://github.com/flutter/flutter/issues/119734
706+
707+ const ListTileThemeData original = ListTileThemeData (
708+ dense: true ,
709+ shape: StadiumBorder (),
710+ style: ListTileStyle .drawer,
711+ selectedColor: Color (0x00000001 ),
712+ iconColor: Color (0x00000002 ),
713+ textColor: Color (0x00000003 ),
714+ titleTextStyle: TextStyle (color: Color (0x00000004 )),
715+ subtitleTextStyle: TextStyle (color: Color (0x00000005 )),
716+ leadingAndTrailingTextStyle: TextStyle (color: Color (0x00000006 )),
717+ contentPadding: EdgeInsets .all (100 ),
718+ tileColor: Color (0x00000007 ),
719+ selectedTileColor: Color (0x00000008 ),
720+ horizontalTitleGap: 200 ,
721+ minVerticalPadding: 300 ,
722+ minLeadingWidth: 400 ,
723+ enableFeedback: true ,
724+ );
725+
726+ final ListTileThemeData copy = original.copyWith (
727+ dense: false ,
728+ shape: const RoundedRectangleBorder (),
729+ style: ListTileStyle .list,
730+ selectedColor: const Color (0x00000009 ),
731+ iconColor: const Color (0x0000000A ),
732+ textColor: const Color (0x0000000B ),
733+ titleTextStyle: const TextStyle (color: Color (0x0000000C )),
734+ subtitleTextStyle: const TextStyle (color: Color (0x0000000D )),
735+ leadingAndTrailingTextStyle: const TextStyle (color: Color (0x0000000E )),
736+ contentPadding: const EdgeInsets .all (500 ),
737+ tileColor: const Color (0x0000000F ),
738+ selectedTileColor: const Color (0x00000010 ),
739+ horizontalTitleGap: 600 ,
740+ minVerticalPadding: 700 ,
741+ minLeadingWidth: 800 ,
742+ enableFeedback: false ,
743+ );
744+
745+ expect (copy.dense, false );
746+ expect (copy.shape, const RoundedRectangleBorder ());
747+ expect (copy.style, ListTileStyle .list);
748+ expect (copy.selectedColor, const Color (0x00000009 ));
749+ expect (copy.iconColor, const Color (0x0000000A ));
750+ expect (copy.textColor, const Color (0x0000000B ));
751+ expect (copy.titleTextStyle, const TextStyle (color: Color (0x0000000C )));
752+ expect (copy.subtitleTextStyle, const TextStyle (color: Color (0x0000000D )));
753+ expect (copy.leadingAndTrailingTextStyle, const TextStyle (color: Color (0x0000000E )));
754+ expect (copy.contentPadding, const EdgeInsets .all (500 ));
755+ expect (copy.tileColor, const Color (0x0000000F ));
756+ expect (copy.selectedTileColor, const Color (0x00000010 ));
757+ expect (copy.horizontalTitleGap, 600 );
758+ expect (copy.minVerticalPadding, 700 );
759+ expect (copy.minLeadingWidth, 800 );
760+ expect (copy.enableFeedback, false );
761+ });
703762}
704763
705764RenderParagraph _getTextRenderObject (WidgetTester tester, String text) {
0 commit comments