diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart index 4091177c8d..6559a07d83 100644 --- a/packages/flutter/lib/src/material/about.dart +++ b/packages/flutter/lib/src/material/about.dart @@ -112,7 +112,7 @@ class AboutListTile extends StatelessWidget { /// values default to the empty string. const AboutListTile({ Key key, - this.icon = const Icon(null), + this.icon, this.child, this.applicationName, this.applicationVersion, diff --git a/packages/flutter/test/material/about_test.dart b/packages/flutter/test/material/about_test.dart index 976c2c4996..afa2804016 100644 --- a/packages/flutter/test/material/about_test.dart +++ b/packages/flutter/test/material/about_test.dart @@ -449,6 +449,26 @@ void main() { expect(rootObserver.dialogCount, 0); expect(nestedObserver.dialogCount, 1); }); + + testWidgets("AboutListTile's child should not be offset when the icon is not specified.", (WidgetTester tester) async { + await tester.pumpWidget( + const MaterialApp( + home: Scaffold( + body: AboutListTile( + child: Text('About'), + ), + ), + ), + ); + + expect( + find.descendant( + of: find.byType(AboutListTile), + matching: find.byType(Icon), + ), + findsNothing, + ); + }); } class FakeLicenseEntry extends LicenseEntry {