Skip to content

Commit 748afd9

Browse files
authored
[CupertinoAlertDialog] Rewrite (flutter#150410)
This PR rewrites `CupertinoAlertDialog` in a cleaner logic, mostly its layout. There are two major difficulties to lay out `CupertinoAlertDialog`: * Laying out the actions section, which switches between a horizontal mode (two buttons in a row) and a vertical mode (several buttons in a column). This PR rewrites it in a special layout widget, `_CupertinoAlertActionSection`. * Allocating vertical space between the content section and the actions section. This reuses `_PriorityColumn`, which was created for the action sheet. In a similar fashion to the action sheet, the management and configuration for dividers and background (overscrolls) were rewritten as well. This PR tries to keep as much original code and behavior as possible since this PR is already very large. As a result, almost no tests are broken. Further improvement will be done in future PRs. * The test that verifies painting overscrolls is replaced by a golden test, since the original test assumes that the background is painted in one rectangle.
1 parent 373efb0 commit 748afd9

File tree

2 files changed

+634
-1436
lines changed

2 files changed

+634
-1436
lines changed

0 commit comments

Comments
 (0)