Commit 924ab725 authored by Alex Fourman's avatar Alex Fourman Committed by Shi-Hao Hong

Fix AboutListTile having an empty icon placeholder when no icon set. (#43422)

parent 8ad7456c
...@@ -112,7 +112,7 @@ class AboutListTile extends StatelessWidget { ...@@ -112,7 +112,7 @@ class AboutListTile extends StatelessWidget {
/// values default to the empty string. /// values default to the empty string.
const AboutListTile({ const AboutListTile({
Key key, Key key,
this.icon = const Icon(null), this.icon,
this.child, this.child,
this.applicationName, this.applicationName,
this.applicationVersion, this.applicationVersion,
......
...@@ -449,6 +449,26 @@ void main() { ...@@ -449,6 +449,26 @@ void main() {
expect(rootObserver.dialogCount, 0); expect(rootObserver.dialogCount, 0);
expect(nestedObserver.dialogCount, 1); 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 { class FakeLicenseEntry extends LicenseEntry {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment