Skip to content

Commit 22cbef3

Browse files
authored
[CP] Fix Snackbar TalkBack regression (#116417)
* Add M2 defaults and template skeleton * add MaterialStateColor functionality to ActionTextColor (issue #110402) * Add M2 defaults and template skeleton * updated material 3 tokens * Updated snackbar demo * add theme tests * add gen defaults * formatting * more whitespace fixes * add widget type * update docs * code review changes * Add line overflow functionality * whitespace fixes * update M3 animation * whitespace fixes * add insetPadding param * Modifed icon parameter to showCloseIcon * white space fixes * test fixes * rename iconColor to closeIconColor * debug test fix * de-britishification * g3fix * g3fix * debug test fix * Fix Snackbar talkback regression * fix merge weirdness * test fix * fix linux analysis error * fix linux analysis error * fix linux analysis error * fix linux analysis error * fix linux analysis error * fix linux analysis error
1 parent e59a388 commit 22cbef3

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

packages/flutter/lib/src/material/snack_bar.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,7 @@ class _SnackBarState extends State<SnackBar> {
628628

629629
Widget snackBar = Padding(
630630
padding: padding,
631-
child: SingleChildScrollView(
632-
child: Column(
633-
mainAxisSize: MainAxisSize.min,
631+
child: Wrap(
634632
children: <Widget>[
635633
Row(
636634
children: <Widget>[
@@ -656,7 +654,7 @@ class _SnackBarState extends State<SnackBar> {
656654
children: maybeActionAndIcon),
657655
),
658656
],
659-
),
657+
660658
),
661659
);
662660

packages/flutter/test/material/debug_test.dart

+2-19
Original file line numberDiff line numberDiff line change
@@ -316,24 +316,7 @@ void main() {
316316
' TextButtonTheme\n'
317317
' Padding\n'
318318
' Row\n'
319-
' Column\n'
320-
' _SingleChildViewport\n'
321-
' IgnorePointer-[GlobalKey#d48e8]\n'
322-
' Semantics\n'
323-
' Listener\n'
324-
' _GestureSemantics\n'
325-
' RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#0c3e0]\n'
326-
' Listener\n'
327-
' _ScrollableScope\n'
328-
' _ScrollSemantics-[GlobalKey#349b8]\n'
329-
' NotificationListener<ScrollMetricsNotification>\n'
330-
' RepaintBoundary\n'
331-
' CustomPaint\n'
332-
' RepaintBoundary\n'
333-
' NotificationListener<ScrollNotification>\n'
334-
' GlowingOverscrollIndicator\n'
335-
' Scrollable\n'
336-
' SingleChildScrollView\n'
319+
' Wrap\n'
337320
' Padding\n'
338321
' MediaQuery\n'
339322
' Padding\n'
@@ -395,7 +378,7 @@ void main() {
395378
' Directionality\n'
396379
' [root]\n'
397380
' Typically, the ScaffoldMessenger widget is introduced by the\n'
398-
' MaterialApp at the top of your application widget tree.\n',
381+
' MaterialApp at the top of your application widget tree.\n'
399382
));
400383
});
401384
}

packages/flutter/test/material/snack_bar_test.dart

+4
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,10 @@ void main() {
12761276
await tester.pumpAndSettle();
12771277

12781278
expect(tester.getSemantics(find.text('snack')), matchesSemantics(
1279+
isLiveRegion: true,
1280+
hasDismissAction: true,
1281+
hasScrollDownAction: true,
1282+
hasScrollUpAction: true,
12791283
label: 'snack',
12801284
textDirection: TextDirection.ltr,
12811285
));

0 commit comments

Comments
 (0)