From 4056639a52bfdb533c6b9563dafe3923e1cd367c Mon Sep 17 00:00:00 2001 From: hangyu Date: Tue, 27 Aug 2024 18:36:20 -0700 Subject: [PATCH] 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) --- packages/flutter/lib/src/material/list_tile.dart | 2 +- packages/flutter/test/material/list_tile_test.dart | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/flutter/lib/src/material/list_tile.dart b/packages/flutter/lib/src/material/list_tile.dart index db6eefe0383..ad9f6d40f6b 100644 --- a/packages/flutter/lib/src/material/list_tile.dart +++ b/packages/flutter/lib/src/material/list_tile.dart @@ -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. diff --git a/packages/flutter/test/material/list_tile_test.dart b/packages/flutter/test/material/list_tile_test.dart index cf35621e0e3..68aa2cb0584 100644 --- a/packages/flutter/test/material/list_tile_test.dart +++ b/packages/flutter/test/material/list_tile_test.dart @@ -270,22 +270,18 @@ void main() { children: [ 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, ), ], ),