Fix AboutListTile having an empty icon placeholder when no icon set. (#43422)
This commit is contained in:
committed by
Shi-Hao Hong
parent
8ad7456cd4
commit
924ab725d9
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user