AlbumsScreen class

Pushed inside the picker's sheet via host?.push(...). Pops with the chosen XAlbum (or null on back). Mirrors telegram-iOS's MediaGroupsScreen pushed onto the modal's nav stack (MediaPickerScreen.swift:3427, MediaGroupsScreen.swift:152).

Mixed-in types
Available extensions

Constructors

AlbumsScreen({required List<XAlbum> albums, required SheetController sheetController, String? selectedId})
Creates the album list.

Properties

albums → List<XAlbum>
Pre-loaded album list — picker does the I/O and passes the snapshot in. Keeps the screen pure.
final
canPop → bool
Whether back pops this page: system back, the swipe and Esc. The back gestures and the system-back state take it as the router renders, so a page whose canPop changes calls XRouter.pagesChanged.
no setterinherited
canSwipeBack → bool
Whether the back gesture (the iOS edge swipe, Android's predictive back) drags this page, read as each one starts and as an edge swipe moves and lifts: an edge swipe it turns off springs back. Set to false for bottom sheets and overlays that dismiss differently; Android's back gesture then goes back as system back does.
no setterinherited
claimsBack → bool
Whether handleBack takes back now, as a home's does while it closes a search. While back goes to a screen that claims it, XRouter.canPop holds, so the framework, not the OS, takes back though nothing pops. The system-back state reads it as the router renders and after the screen emits, so a screen whose claim changes emits, where it is a Listenable, or calls XRouter.pagesChanged.
no setterinherited
detach ↔ VoidCallback?
Set by the router when pushing. Called during pop to remove the page from the router stack and notify the delegate.
getter/setter pairinherited
disposed → bool
Whether dispose has already run.
no setterinherited
future → Future<XAlbum?>
A future that completes with the result when the page is popped.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether there is at least one active listener.
no setterinherited
host → ScreenHost?
The host that pushes from inside this screen's body should target. Defaults to parentHost — regular screens push siblings onto their own host. SheetScreen overrides this to route into its own nested stack so pages pushed from inside a sheet body land within the sheet rather than escaping it.
no setterinherited
isModal → bool
Whether this screen is a modal (dialog, bottom sheet, etc.), which Esc pops while it is the top screen.
no setterinherited
key → Key?
Identity tag used by ScreenStack to reconcile a home slot: same runtimeType + same key → same surface, slot State preserved. Has no effect on stack entries (diffed by ==).
no setterinherited
parentHost ↔ ScreenHost?
The host that pushed this screen — set by the host on push. Mirrors UIKit's UIViewController.navigationController. null until pushed.
getter/setter pairinherited
popped ↔ bool
Whether this page has been popped (explicitly removed).
getter/setter pairinherited
removed ↔ VoidCallback?
Set by the router when pushing. Called from onRemoved after the exit animation completes for final cleanup (disposal).
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedId → String?
The id of the currently active album in the picker — renders a check on that row. null matches the "Recents" virtual row.
final
sheetController → SheetController
Inherited from the picker so the inner list scroll coordinates with the sheet's pan (drag-down at scroll-top expands the sheet's drag rather than overscrolling the list).
final
supportedOrientations → Iterable<DeviceOrientation>
Device orientations this screen supports while it is the topmost visible page. The router applies the topmost screen's value via SystemChrome.setPreferredOrientations on each active-screen change, mirroring UIKit's per-UIViewController.supportedInterfaceOrientations. Override to force portrait/landscape on a specific page (e.g. a camera).
no setterinherited
transitionDuration → Duration
Duration of the enter/exit animation.
no setterinherited

Methods

addDispose(VoidCallback callback) → void
Registers a disposal callback. Ignored if already disposed.
inherited
addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
buildPresenter(BuildContext context) → Widget
Build the page content.
override
buildTransition(BuildContext context, Animation<double> animation, Widget child) → Widget
Wrap child (the output of buildPresenter) in a transition driven by animation (0→1 on push, 1→0 on pop).
inherited
dispose() → void
Releases whatever this object holds. Calling it twice is an error.
inherited
disposeBy(Dispose disposer) → void

Available on Disposable, provided by the DisposableDisposerExtension extension

Adds this object's dispose to another Dispose collector.
handleBack() → bool
Custom back handling, asked by system back and by a predictive back as it commits. Return true to consume the back: the page stays, and a predictive back springs it back. On Android 13 and later the OS takes back that would pop nothing, unless claimsBack holds.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notifies all registered listeners.
inherited
onActive() → void
Called when this screen becomes the topmost visible screen in the router. Fires once after push, and again whenever it becomes topmost after a screen above it pops or hides, or its shell shows it. Always paired with a later onInactive.
inherited
onDetach() → void
Called during pop before the future is completed. Override for cleanup that must happen before the exit animation.
inherited
onInactive() → void
Called when another screen is pushed on top, when its shell hides it, or right before this one is popped. Mirror of onActive.
inherited
onPush() → void
Called after the page is pushed onto the router.
inherited
onRemoved() → void
Called after the exit animation completes and the page is fully removed. Override for cleanup that should happen after the page is off screen.
inherited
pop([XAlbum? result]) → void
Remove this page. Marks as popped, detaches from the router, and completes the future with result.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
subscribe(VoidCallback callback) → VoidCallback

Available on Listenable, provided by the ListenableExtension extension

Adds callback as listener and returns a function to remove it.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited