Change flag internalAddSemanticForOnTap default value to true (#153193)

This is a follow up on https://github.com/flutter/flutter/pull/152526 

1. Make changes with an additional parameter ( bool internalAddSemanticForOnTap = false) (https://github.com/flutter/flutter/pull/152526 )
2. Send regular CLs in google3 to pass internalAddSemanticForOnTap: true, and update the tests / text goldens 3. accordingly.  g3 fix sent:  cl/661353802
3. Send a PR to flip the default value to true. (This PR)
4. Send CLs internally to remove internalAddSemanticForOnTap: true.
5. Send another PR to remove the now-redundant internalAddSemanticForOnTap flag.
(<----This PR is step 3)
This commit is contained in:
hangyu 2024-08-27 18:36:20 -07:00 committed by GitHub
parent fd26daa003
commit 4056639a52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -410,7 +410,7 @@ class ListTile extends StatelessWidget {
this.minLeadingWidth,
this.minTileHeight,
this.titleAlignment,
this.internalAddSemanticForOnTap = false,
this.internalAddSemanticForOnTap = true,
}) : assert(!isThreeLine || subtitle != null);
/// A widget to display before the title.

View File

@ -270,22 +270,18 @@ void main() {
children: <Widget>[
const ListTile(
title: Text('one'),
internalAddSemanticForOnTap: true,
),
ListTile(
title: const Text('two'),
onTap: () {},
internalAddSemanticForOnTap: true,
),
const ListTile(
title: Text('three'),
selected: true,
internalAddSemanticForOnTap: true,
),
const ListTile(
title: Text('four'),
enabled: false,
internalAddSemanticForOnTap: true,
),
],
),