Fix AlertDialog.adaptive clipBehavior is non-nullable (#154173)
Fixes https://github.com/flutter/flutter/issues/153983
This commit is contained in:
@@ -464,7 +464,7 @@ class AlertDialog extends StatelessWidget {
|
||||
Color? surfaceTintColor,
|
||||
String? semanticLabel,
|
||||
EdgeInsets insetPadding,
|
||||
Clip clipBehavior,
|
||||
Clip? clipBehavior,
|
||||
ShapeBorder? shape,
|
||||
AlignmentGeometry? alignment,
|
||||
bool scrollable,
|
||||
|
||||
@@ -2894,6 +2894,12 @@ void main() {
|
||||
const SimpleDialog simpleDialog = SimpleDialog();
|
||||
expect(simpleDialog.insetPadding, isNull);
|
||||
});
|
||||
|
||||
testWidgets('Can pass a null value to AlertDialog.adaptive clip behavior', (WidgetTester tester) async {
|
||||
for (final Clip? clipBehavior in <Clip?>[null, ...Clip.values]) {
|
||||
AlertDialog.adaptive(clipBehavior: clipBehavior);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
class _RestorableDialogTestWidget extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user