Skip to content

Commit ad44b05

Browse files
author
Shi-Hao Hong
authored
Revert "AlertDialog widget scrollable by default (flutter#49848)" (flutter#51886)
This reverts commit 28f2c96.
1 parent f9c118b commit ad44b05

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class AlertDialog extends StatelessWidget {
259259
this.insetPadding = _defaultInsetPadding,
260260
this.clipBehavior = Clip.none,
261261
this.shape,
262-
this.scrollable = true,
262+
this.scrollable = false,
263263
}) : assert(contentPadding != null),
264264
assert(clipBehavior != null),
265265
super(key: key);

packages/flutter/test/material/dialog_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ void main() {
11001100
color: Colors.green,
11011101
height: 1000,
11021102
),
1103+
scrollable: true,
11031104
);
11041105
await tester.pumpWidget(_buildAppWithDialog(dialog));
11051106
await tester.tap(find.text('X'));
@@ -1119,6 +1120,7 @@ void main() {
11191120
color: Colors.orange,
11201121
height: 1000,
11211122
),
1123+
scrollable: true,
11221124
);
11231125
await tester.pumpWidget(_buildAppWithDialog(dialog));
11241126
await tester.tap(find.text('X'));
@@ -1144,6 +1146,7 @@ void main() {
11441146
color: Colors.orange,
11451147
height: 400,
11461148
),
1149+
scrollable: true,
11471150
);
11481151
await tester.pumpWidget(_buildAppWithDialog(dialog));
11491152
await tester.tap(find.text('X'));

0 commit comments

Comments
 (0)