Repository navigation
feat: add AboutDialog control with a licenses page - #29
Merged
Merged
Conversation
This was referenced Oct 28, 2026
Material shows the SDK AboutDialog and LicensePage; iOS shows a CupertinoAlertDialog with View Licenses/Close and a hand-built Cupertino licenses page (inset-grouped LicenseRegistry packages, then the license text with paragraph indents), with no Material widgets. view: licenses opens the licenses page directly. Both follow the dialog open/_open/dismiss lifecycle through Ruflet's dialog routes in the owning navigator; open: false also closes the license pages opened from the dialog but never an app view.
_close used popUntil, which popped every pageless route above the dialog, so closing an AboutDialog also closed another control's dialog opened above it and fired its dismiss. The renderers now use the shared control_route helper (stacked on the early-close fix). The helper gains ControlRouteScope: routes pushed from inside a control's route while carrying its InheritedThemes (the SDK View licenses button via showLicensePage, the Cupertino licenses pages via pushCarryingThemes) are adopted by that control. open: false pops or removes only the dialog and the license routes it opened itself.
AdamMusa
force-pushed
the
feat/about-dialog
branch
from
October 28, 2026 15:39
b7e95b1 to
e1f0782
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #37 (
fix/dialog-early-close-race). This branch is stacked on it so that it can use the sharedlib/src/widgets/control_route.dart. Until #37 merges, this PR's diff also shows #37's commita81dfdf; review commitscd7c20dande1f0782.Ruby counterpart: AdamMusa/ruflet#44
Item D3 (P2): adds an
AboutDialogcontrol with an open-source licenses page (App Store / Play compliance).What it renders
AboutDialog(name, version, icon, legalese,controlsas children, built-in "View licenses" / "Close")CupertinoAlertDialog: title"<name> <version>"; content is the icon, legalese andcontrols; actions are "View Licenses" and "Close" (default)LicensePagewidgets/cupertino_license_page.dart(below)view: "licenses"LicensePagedirectlyTitle(SDK rule)Title(same rule)Cupertino license page. It is a
CupertinoPageScaffoldwith aCupertinoNavigationBar(middle: "Licenses"), an app header (icon, name, version, legalese), and aFutureBuilderoverLicenseRegistry.licenses, grouped by package and sorted case-insensitively. Packages are listed in aCupertinoListSection.insetGroupedofCupertinoListTiles (package,additionalInfo= license count,CupertinoListTileChevron). Tapping a package opens its license text:LicenseParagraph.indentbecomes a 16 px leading inset per level, centered paragraphs are centered, and entries are separated by hairlines. It uses no Material symbols.Wire contract
AboutDialogapplication_name,application_version,application_icon(a Control, or an icon viabuildIconOrWidget),application_legalese,controls,view("about"|"licenses"),open,modal,barrier_colordismissLifecycle (same
open/_open/dismisscontract as AlertDialog)open: truepresents in a post-frame callback inside the owning navigator. The dialogs use the owner'sControlMaterialDialogRoute/ControlCupertinoDialogRoute, so the barrier is in the route overlay and live (1f21fca).open: falseresetsopenand firesdismissexactly once.open: falsecloses only the dialog's own routes: the dialog, or the licenses page forview: "licenses", plus the license routes it opened itself. Each route is popped when it is on top and removed withremoveRoutewhen something covers it. Another control's dialog or any app view above it is never touched, and only this control'sdismissfires.ControlRouteScope, anInheritedThemeadded to fix: close only the dialog's own route when open turns false #37's helper. A route pushed from inside it while carrying the pusher's themes is adopted by the control: that includes the SDK "View licenses" button (showLicensePagecaptures and re-appliesInheritedThemes) and the Cupertino licenses list/detail pages (pushCarryingThemes, the same mechanism). Present, close, early close and the singledismissare fix: close only the dialog's own route when open turns false #37'spresentControlRoute/closeControlRoute. There is no local lifecycle code and nopopUntilany more.Deviations from the spec (intentional)
showAboutDialog/showLicensePage.showAboutDialogdefaults to the root navigator and bypasses the live-barrier route.showLicensePagereturnsvoid, so its route could not be tracked foropen: false/dismiss.modalandbarrier_color, for parity with AlertDialog. They feed the existing route classes at no extra cost.CupertinoLocalizationshas no equivalent strings.Tests
test/widgets/ruby_about_dialog_test.darthas 10 iOS cases and 7 Android cases. Each iOS case also asserts no Material widgets, noAboutDialogand noLicensePage:Titledismissonce and resetsopenLicenseRegistrypackage with its count and chevron, plus the app header. Tapping it shows the text with a 16 px indent, a centered heading and correct ordering. Back to the list and back to the alert, then Close firesdismiss.view: "licenses"opens theCupertinoPageRoutedirectly; popping it firesdismissopen: falsecloses the alert and the license page above it; reopening worksmodalkeeps the alert openAboutDialoggets name/version/legalese/icon/children, and "View licenses" opensLicensePagedismiss;view: "licenses"opensLicensePageand popping it firesdismiss;open: falsecloses itopen: false(plus a rebuild) closes the About dialog only. The other dialog stays open (open == true) and the only event is1:dismiss; closing the other dialog afterwards adds20:dismiss.open: falseremoves the dialog and its license routes (iOS: list + detail page; Android: the SDKLicensePage), and the other dialog stays. Android also checks thatopen: falsecloses theLicensePagethe SDK button opened.Before the QA fix, the "another dialog above" cases failed on both designs: the other dialog was closed as well. After it, all 17 pass, along with #37's
dialog_early_close_test(10) andmodal_presentation_test(3).Matrix fixture:
case 'AboutDialog'usesopen: false. All 5 platforms pass, and so do the architecture tests.verify_pr.shwith Flutter 3.41.2 against the Ruby counterpart:Ruby usage