970b7cb16d
Keep the Material update dialogs as the only reachable implementation while preserving public cupertino parameters for callers. Update focused tests and document the verified checks.
2.3 KiB
2.3 KiB
Cupertino removal — lib/features/updates
Change
lib/features/updates/launch_update_dialog.dart: deleted the Cupertino dialog branches fromshowLaunchUpdateDialog,showLaunchUpdateFailureandinstallLaunchUpdate, and from the private_InstallProgresswidget (CupertinoAlertDialog,CupertinoActivityIndicator,CupertinoDialogAction,showCupertinoDialog). The MaterialAlertDialog/LinearProgressIndicatorpath is unchanged.- Public signatures keep
required bool cupertino(unused now) so callers in other directories continue to compile; nothing outsidelib/features/updateswas edited. - Removed the
package:flutter/cupertino.dartimport; noCupertinoIconsorCupertinoColorswere used in this directory.
Tests
test/features/updates/native_update_dialog_test.dart: existing Material prompt loop retained (cupertino: false). Added regression tests for the Material failure alert and the Material install-progress dialog/progress bar. No Cupertino test variants were present to delete.test/application/startup_update_flow_test.dart(review follow-up): the web refresh test no longer mounts withcupertino: true; it now asserts the MaterialAlertDialog. The localmounthelper lost its unusedcupertinoparameter and passescupertino: falseexplicitly. Thepackage:flutter/cupertino.dartimport becamepackage:flutter/material.dart.test/application/startup_update_check_test.dartalready mounted Material only (cupertino: false); no change.- No other test reaches these dialogs with
cupertino: trueor aCupertinoApphost; the remainingcupertino: truetests elsewhere cover unrelated UI.
Checks
tool/analyze.sh: clean (16s, exit 0).tool/memwatch/full.sh 'test/features/updates test/application/startup_update_flow_test.dart test/application/startup_update_check_test.dart': 38 passed, 0 failed, 0 skipped; 38s; exit 0.grep -rn 'Cupertino\|cupertino' lib/features/updates: only the three keptrequired bool cupertinoparameters. In the update tests onlycupertino: falsearguments remain.
UI states
- Update-available prompt, update-failure alert and install-progress dialog now always render the existing Material variants. No pixel change on the Material path; Cupertino host paths are unreachable in this Material-only app.