Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable
explicitChildNodes
for the AlertDialog
content (#149130)
fixes [AlertDialog content semantics merged](flutter/flutter#147574) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, // showSemanticsDebugger: true, home: Scaffold( body: SafeArea( child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ const Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('Some text'), Text('More text'), ], ), Builder(builder: (BuildContext context) { return ElevatedButton( onPressed: () { showDialog<void>( context: context, builder: (BuildContext context) { return AlertDialog( title: const Text('Dialog Title'), content: const Column( children: <Widget>[ Text('Some text'), Text('More text'), ], ), actions: <Widget>[ TextButton( onPressed: () { Navigator.of(context).pop(); }, child: const Text('Close'), ), ], ); }, ); }, child: const Text('Open Dialog'), ); }), ], ), ), ), ), ); } } ``` </details> ### Before vs After ![Screenshot 2024-05-27 at 14 59 57](https://github.com/flutter/flutter/assets/48603081/3b231a7a-db71-4dbf-bd4a-dd44a537cae8) ![Screenshot 2024-05-27 at 14 56 04](https://github.com/flutter/flutter/assets/48603081/219c1de5-ad35-49b3-a80f-4f036184e22b)
- Loading branch information