liquid_shell 0.1.0-dev.9
liquid_shell: ^0.1.0-dev.9 copied to clipboard
Adaptive navigation shell with a Liquid Glass look for iOS and Android. A floating tab bar on phones and a glass sidebar on tablets, with no router dependency.
0.1.0-dev.9 #
First release on pub.dev.
0.1.0-dev.8 #
- The package archive no longer includes tests (they read files outside the package). The README states the supported platforms (iOS and Android), the install requirements and the known issues.
- Behaviour change (VK-600). With native chrome on iOS 26+,
minimizeOnScroll(defaulttrue) now also minimizes UIKit's compact tab bar when the body scrolls down. Withfalsethe native bar never minimizes, as before. - Visual change (VK-600). With native chrome on iOS 26+ and
minimizeOnScroll: true(the default), UIKit now draws its bottom scroll-edge effect: the body near the bottom edge, under and beside the compact bar, is softly blurred, as under a nativeUITabBarControllerover a scroll view. WithminimizeOnScroll: falsethe effect is hidden and the body there stays sharp, as before. - Both bars expand when a fling or a programmatic scroll (a status-bar tap,
animateTo(0)) reaches the top. A drag back never does. This is new for the Flutter bar too. - A change of the selected destination expands both bars, except that the native bar keeps its form when the change selects the search tab (UIKit's own form there). Neither bar minimizes while the search tab is selected.
- A new shell (a new key, a hot restart) expands a native bar that an earlier one left minimized.
- A wide iPad (regular width: top bar, sidebar) never minimizes.
- Known limits of the native bar: platform views (web view, native map) do
not minimize it; trackpad, mouse and Apple Pencil scrolling do not;
bottomAccessoryis out of scope. A very long feed is handled by growing the hidden proxy's content. - Fix (VK-572). With native chrome,
LiquidSearchValue.composingnow ends with the native search. A dismissal mid-composition that the app or the shell asked for (deactivate(), another tab, a dialog above, hidden chrome) or a reconnected scene left it true until the user's next edit, so an app that checkscomposingbefore writing held its write. It affects IMEs that mark their text (Japanese, Chinese), not Apple's Vietnamese Telex.onChangedis not called for it: the text did not change. - Fix (VK-572). When native chrome takes over while the Flutter field
holds the search (focused, its keyboard put away, or composing), for
example
nativeChromeback toautoor a late native install, the search now ends with its text kept, as it does when the Flutter field hides, and native is told the search is inactive. Before,isActive(andcomposing) stayed true while UIKit showed an idle search: system back was blocked,deactivate()did nothing, and a shell pushed as a page could not be popped. - Fix (VK-594). iPhone with native chrome, in landscape, search active
with the keyboard up:
chromeInsets.bottomandLiquidShellScope.contentPaddingOf(context).bottomwere 0, so the results could not scroll clear of the field and the keyboard. They now cover the raised field, as in portrait (268 pt on an iPhone 17 Pro). The iPad is unchanged. - Fix (VK-604). Native scope bar: a user tap on a scope that the app
removed at the same moment no longer leaves the bar and
LiquidSearchController.scopeIndexon different scopes: the shell sends the controller's scope back to native.doc/search.mdnow says that the app clampsscopeIndexwhen its scopes shrink. - Fix (VK-593). A page title kept alive off screen (a
PageViewpage) no longer rebuilds on every frame. - Fix (VK-593). Back is no longer swallowed by a
NavigatorPopHandlerwith no callback around a branch navigator; one with a callback answers back whetherenabledor not. - Fix (VK-593). Back no longer pops a page in a
PageViewor list page that is off screen (kept alive, or in the cache extent). - Fix (VK-593). Back and the iOS edge swipe pop a navigator nested in
a tab's page first (a nested flow, a go_router
ShellRoutein a branch), then the tab's page; before, they popped the tab's page or the whole shell. - Fix (VK-775). A second back while a dialog is still closing pops the page of a navigator nested in the tab's page, not the page that holds it: a route that is closing no longer covers the page under it.
- Fix (VK-680). Back and the iOS edge swipe pop the page of a tab that
a router shows a few frames after the selection (the end of a
cross-fade), also with no
PopScopeof the app's own; before, they popped the whole shell. - Fix (VK-774). A shell nested in another shell's body (sub-tabs) answers back in its own order: its overlay sidebar closes, then its active search ends, then its tab's page pops. Before, the outer shell popped the inner shell's tab page directly.
- Behaviour change (VK-774). With a nested shell's search active at its tab's root, back ends that search instead of popping the outer shell's route; with its overlay sidebar open, back closes the sidebar first.
- Fix (VK-699). When Flutter chrome takes over an active native search
(
nativeChrome: off, a forced glass tier, a lost native install, standby under another shell), the search now ends with its text kept,composingfalse andonChangednot called. Before, the controller stayed active (and blocked back) or keptcomposingtrue. LiquidGlassRendereris now marked@immutable. No behaviour change; a custom renderer with a non-final field or a non-const constructor now gets the analyzer'smust_be_immutableorprefer_const_constructors_in_immutables(VK-702).- Fix (VK-702). A platform implementation whose
watchSignals()throws instead of returning a stream no longer breaks everyLiquidGlass: the glass uses no signals, and debug builds log the error once. - Behaviour change (VK-702). The gap below the bottom tab bar now
follows the device's platform (
defaultTargetPlatform) instead ofThemeData.platform. An Android app themed as iOS keeps clear of a 3-button navigation bar; an iPhone app themed as Android sits 21 pt above the home indicator. App widget tests that model an iPhone only throughThemeData.platformnow get the non-iOS gap (flutter testruns as Android): run them withTargetPlatformVariant.only(TargetPlatform.iOS)ordebugDefaultTargetPlatformOverride. - Behaviour change (VK-702). While the Flutter overlay sidebar is open, the page, the top tab bar and an idle search field behind its barrier take no keyboard focus, focus starts in the sidebar, and Escape closes it. A page text field that had focus loses it (the keyboard closes) when the overlay opens, and focus is not restored to it when the sidebar closes. An active search field behind it keeps its focus, and Escape there still ends the search.
- Visual change (VK-702). The bottom tab bar, the compact search row and
the top tab bar keep inside the horizontal safe area: on a phone in
landscape they move clear of the notch or of an Android side navigation
bar or display cutout. A custom
chromeBuildertab bar gets constraints narrower by the side insets. With no side insets (portrait, iPad) nothing moves.
0.1.0-dev.7 #
LiquidSegmentedControl(VK-550). A public segmented control after iOS 26'sUISegmentedControl: a flat 32 pt track centred in a 44 pt box, a white thumb, and a liquid lens that lifts under the finger, follows a drag across segments, and lands with a wobble (a tap commits on release; one selection click per segment crossed while dragging). Controlled and text-only:segments(LiquidSegment(label, enabled, semanticLabel), two or more),selectedIndex,onChanged(null disables the control),expand(fill the width, or size to the labels) andsemanticLabel. Colours and label style come from three newLiquidGlassThemefields:segmentTrack,segmentThumbandsegmentLabelStyle. Text scale to x2, RTL, reduce motion and the large content viewer are handled. Seedoc/segmented_control.md.- Search scopes (VK-550).
LiquidSearch.scopestakes the scope titles (two or more, or null).LiquidSearchScopeBar.scopesis now optional: null reads the shell'sLiquidSearch.scopes; when both are given they must be equal (debug assert). An app write ofLiquidSearchController.scopeIndexnow reaches the shell, so the native scope bar can follow it.LiquidShellScopeData.nativeSearchScopesis true while UIKit draws the scope bar, and the newLiquidShellScopeData.searchScopesholds the shell'sLiquidSearch.scopes(null without scopes or a shell search). Seedoc/search.md. - Native scope bar on iOS 26+. With native chrome and
LiquidSearch.scopes, the scope bar is UIKit's own (.manualactivation, shown while the search is active, hidden when it ends). It sits at the top on an iPhone and under the field on an iPad.LiquidSearchScopeBarbuilds nothing there. A tap on a scope selects it and puts the keyboard away; the search stays active. - Platform interface.
LiquidNativeEventis sealed and gains a case,LiquidNativeSearchScopeChanged: an exhaustiveswitchover it needs the new case (as in dev.5, sealed, add the new cases).LiquidNativeSearchConfig.scopesandsetNativeSearchScopeare new. - Known limits. In
expandmode below 44 pt per segment the hit targets follow the segment width. An intrinsic "A | B | C" is 132 pt against native's 96 (the 44 pt minimum, owner Q-C). The landing wobble matches native'sflickcapture in peaks and settle time, not frame by frame (Q-E). On five segments a tap over three or four segments overshoots more than native's (up to 5.6 pt against 4.3); native's lens bends the labels it passes, these stay above it. - Behaviour changes.
LiquidSearchScopeBaris drawn byLiquidSegmentedControl: a flat track with a white thumb and a liquid lens, as iOS 26'sUISegmentedControl, instead of a glass pill with aprimaryContainerchip and an ink ripple. Its height is unchanged (44 pt).- Segment labels keep your app's font family (
ThemeData.fontFamily, read fromtextTheme.labelLarge); size and weights followUISegmentedControl(13 pt, w400 / w500 when selected). SetLiquidGlassTheme.segmentLabelStyle.fontFamilyto choose another. In the system font on iOS and macOS (no family, or SF Pro) the labels take SF Pro's tracking for the drawn size, as UIKit does (−0.08 pt at 13 pt); an app's own font keeps its spacing. LiquidSearchScopeBar.scopeschanged fromList<String>toList<String>?. Every constructor call still compiles; only code that readsbar.scopesas non-null needs a!. Allowed before 1.0.- Widget tests: each segment's title is painted twice (the normal
label and the copy under the lens), but only the normal one is a
Text, sofind.text('Songs')still finds one widget. Prefer tapping a segment through its node,find.bySemanticsLabel('Songs'): the labels themselves ignore pointers.
0.1.0-dev.6 #
- Tab bar fidelity (VK-503). The Flutter tab bar matches iOS 26.5:
native slot geometry (86 pt slots, 21 pt margins, the pill pinned at
the start beside a trailing circle), a liquid lens that engages on touch
(milky in its core, clear and refracting at its rim, with the rainbow),
follows a drag and snaps on release (the measured springs), tinted and
magnified icons under the lens, a pill swell, a highlight and a finger
glow, an icon pop on tap, and selection clicks while dragging. See
doc/tab_bar.md. - Behaviour changes.
- A tab is selected on release, not on touch. A drag selects the tab nearest the lens when it lifts, a flick the tab under the finger.
- Every tab slot draws
selectedIcon ?? icon, selected or not, as iOS draws a filled symbol in every slot. Give each destination a filledselectedIcon. The sidebar still switchesicon/selectedIconby selection. - Tab colours: the selected tab is
ColorScheme.primaryon a neutral capsule (selectionFill), not aprimaryContainerchip; the others aretabForeground. Sidebar rows usetabForegroundtoo. - There is no ink splash.
- With
minimizeOnScroll, the minimized bar is a 48 pt icon-only circle that expands on a tap or on a selection change, not when the page scrolls back up, as on iOS 26. AchromeBuildersees the same inLiquidChromeDetails.minimized: it stays true until the chrome callsdetails.expandor the selected destination changes. LiquidChromeDetails.minimizedis also true while the search tab is selected (the bar collapses into a circle beside the search field);details.expanddoes not expand it there, leaving search does.- The bottom
LiquidTabBarfills the width it is given. With a trailing action the pill is pinned at the start and the circle at the end; without one the pill is centred. Give it a narrower box (aSizedBox) to keep the circle close to the pill. - Landscape phones get the 44 pt bottom bar (icon beside a 12 pt label)
instead of the top bar: a landscape shell lower than
LiquidShellBreakpoints.compactHeight(500) is compact. PasscompactHeight: 0for the previous layout. - The iPad top bar is 48 pt, label only (17 pt, the search tab as an
icon), 5.5 pt below the safe area instead of 20, so it sits 14.5 pt
higher and, with the 4 pt lower bar, a regular layout's
chromeInsets.topis 18.5 pt smaller. - The bottom bar margin is 21 pt (8 pt in a narrow shell).
- Badges are the native 21 pt red capsule, #FF383C in light and
#FF4245 in dark (
badgeColor), in the tab bar and the sidebar. LiquidSearchValue.activeandLiquidSearchPhase.activemean the search is open, not that the field has focus (VK-571): afterdismissKeyboard()(a drag on the results, a scope tap) the Flutter field has no focus and the phase staysactive, as it does natively. AchromeBuilderorsearchPhaseOfreader that tookactivefor "keyboard up" sees the field in the bottom row with its × instead.
- New:
LiquidGlassTheme.selectionFill,tabForeground,badgeColor,tabIconSize;LiquidShellBreakpoints.compactHeight; a scroll-edge pocket under the liquid bottom bar (three blur bands and a faint dim, liquid tier only: frosted, solid and Reduce Transparency draw none). - Defaults changed for every glass surface (bars, circles, sidebar,
dialogs, the back button):
rimHighlight0.12,liquidTinta neutral milky white @ 0.55 (light) / #1C1C1C @ 0.90 (dark) instead of the scheme'ssurface@ 0.40 / 0.45 (native glass takes no app hue),shadow7 % (0, 3) blur 20,dispersion0 in the constructor and infromColorScheme(the touched tab lens adds its own fringe; passdispersion: 0.3for the previous look),labelStyle10 / 1.2 / w500 / no tracking. - Fixes (VK-491, VK-502). The native page stack is computed after the frame, so a tab switch no longer sends the stack of the tab just left; a tab keeps its pages while offstage, and returning to it restores them without replaying the push.
- Fix (VK-551). With native chrome an active search now blocks the
shell's own pop, as the Flutter field already did: system back
deactivates it, and the iOS edge swipe no longer pops a shell pushed
above another page while the search is active (which left the
keyboard with nothing to dismiss it). Only an active search does this:
while it is active, the swipe on a page pushed in the search tab pops
that page (VK-567 below does the same with the search inactive, in
every tab). Hidden native chrome (
LiquidHideChrome) ends an active search and keeps its text. - Fix (VK-567). Back pops the tab first, as on iOS. In a shell that
is itself a pushed page, the iOS edge swipe on a page pushed in any tab
popped the whole shell, natively and with Flutter chrome: Flutter gives
the swipe to the shell's own route before the tab's. Now, while the
selected tab's navigator (the one on screen under
body) can pop, the shell blocks its own route: the swipe pops the tab's top page, and system back pops it throughmaybePop, so the page'sPopScopestill decides. A tab at its root lets the shell's route pop as before; a page kept in another tab never holds it. Also new: a shell at the app's root pops the tab's page on system back (Android) instead of leaving the app, and an app's ownPopScopeon the shell's route hearsdidPop: falsewhile a tab's page pops (doc/router_integration.md). A drawer or a persistent bottom sheet on the tab's page closes first, at the tab's root too; with several navigators on screen, back pops the last one that can pop. A navigator inside a tab's page is not looked at yet. Migration: remove aNavigatorPopHandleraround a branch navigator (the README's "Hide the chrome" case no longer has one). One the app keeps answers back for its navigator and the shell only blocks its own route, so one back is still one step. - The search keyboard goes on a drag or a scope tap (VK-571). As in
Apple Music and Settings, a user drag that scrolls the shell's body (the
results), or a tap on
LiquidSearchScopeBar, puts the keyboard away and keeps the search: the query, the results, the active phase and its × stay. Natively the field resigns first responder (UIKit's search stays presented); the Flutter field unfocuses and the search stays active. A tap on the field brings the keyboard back; ×,deactivate(), system back, another tab or hidden chrome end the search, as before. Only a drag that moves at least as far along the list's axis as across it counts: a programmatic scroll, or a near-horizontal swipe over the results (the iOS edge swipe, even when the thumb drifts and the list scrolls a little), keeps the keyboard. NewLiquidSearchController.dismissKeyboard(), andLiquidSearch.dismissKeyboardOnDrag(default true) to opt out of the drag. See Behaviour changes for whatactivenow means.
0.1.0-dev.5 #
- Search tab.
LiquidDestinationRole.searchonLiquidDestination(at most one, the last destination, placed everywhere) withLiquidShell.search(LiquidSearch: controller, placeholder,onChanged,onSubmitted).LiquidSearchController,LiquidSearchValueandLiquidSearchPhase(idle, selected, active);LiquidSearchScopeBar, a glass segmented control for search scopes. On iOS 26 with native chrome the field is UIKit's ownUISearchTab: on iPhone the ⌕ becomes the field and the tabs collapse to one circle; on iPad the field sits under the title row and rises into it when active. Everywhere else the shell draws the same states in glass, liquid on the default tier. The query is kept across tab switches; × clears it. - Pages and the glass back button.
LiquidPage(title, large title, the back button when its navigator can pop) andLiquidBackButton. In the native search tab, UIKit draws the title and its glass back circle; every back, the long-press back menu included, is a proposal that goes throughNavigator.maybePop, soPopScoperuns. - A root
LiquidPage's large title now sits on the bar row, as Apple Music's does: in the Flutter bar on every platform, and natively on iPhone (on iPad the native search root shows a small title, or its own large-title row withlargeTitle: true). A pushed page's large title keeps a row of its own in the Flutter bar; under the native search tab, UIKit draws it small and centred (seeLiquidPage.largeTitle). LiquidShellScopeData.searchPhaseandnativePageBar;chromeInsetscovers the search field in every phase, soLiquidShellScope.contentPaddingOfkeeps working (never addviewInsetson top).LiquidShellStrings.searchPlaceholder,cancelSearchandback.LiquidChromeSlot.searchFieldandLiquidChromeDetails.search(LiquidSearchChromeDetails) for achromeBuilder.- Breaking:
LiquidChromeSlotgainssearchField, so an exhaustiveswitch (details.slot)in achromeBuilderneeds the new case (or adefault). - Example: a real "Search" case (songs and places, Vietnamese without accents matches); the trailing action case is now "Compose".
0.1.0-dev.4 #
- Liquid glass. A built-in, clean-room lens shader draws the
liquidtier on Impeller: edge refraction, a specular rim, light dispersion, blur and tint.LiquidGlass.precache()loads it before the first frame. NewLiquidGlassThemefields, all optional with defaults:liquidTint(solid@ 0.40, 0.45 when dark),refraction,dispersion,liquidBlurSigma. - Frosted instead of liquid without Impeller, on Android without Vulkan 1.1
or under 3 GiB of memory, in battery saver and iOS Low Power Mode, after
sustained slow frames, and inside another
BackdropFilter. - The Flutter glass alert and action sheet (
showLiquidAlert/showLiquidActionSheetoff the native path) draw the liquid tier too: they areLiquidGlass. Doc imagescase_alertandcase_action_sheetare now the liquid tier. - A
forcedTierkeeps shells under it on Flutter chrome. LiquidGlassSignalsgainslowEnd,glesOnly,slowFramesandprefersFrosted.- Breaking:
- Liquid is the default tier on Impeller (iOS, Android 10+, macOS),
where glass was frosted. Force
frostedwithLiquidGlassPolicy(forcedTier:)to keep the old look. tintandblurSigmanow style frosted only. The liquid tier readsliquidTint,liquidBlurSigma,refraction,dispersion,rimHighlight(its specular rim),shadowand the shape. A brand theme that sets onlytint/blurSigmashows on the default tier as the stock liquid glass: setliquidTint(andliquidBlurSigma) too.borderandborderWidthdraw on frosted and solid, not liquid.LiquidGlassSignals.canBluris removed (Skia now draws frosted, not solid);debugLiquidGlassCanBlurOverrideis nowdebugLiquidGlassCanRefractOverride; battery saver gives frosted, not solid.
- Liquid is the default tier on Impeller (iOS, Android 10+, macOS),
where glass was frosted. Force
- Known limits of the liquid tier (README "Limitations",
doc/liquid.md): it writes opaque pixels, so over a transparent window or in an image capture of a subtree it is a solid tint (forcefrostedthere); under a scaling or rotating ancestor the lens is placed on the bounding box.
0.1.0-dev.3 #
showLiquidAlert/showLiquidActionSheet: nativeUIAlertControlleron iOS 26+, Flutter glass elsewhere;LiquidAlertAction,LiquidAlertActionStyle,LiquidDialogPresentation;LiquidShellStrings.dismiss. Example: Alerts and action sheets case; the guard uses the native alert.
0.1.0-dev.2 #
- Native iOS 26 chrome (opt-in) on iPhone and iPad, compact windows
included:
LiquidShell(nativeChrome:),LiquidNativeChrome,LiquidNativeSidebarFooter, andsfSymbolonLiquidDestinationandLiquidTabAction. Every iPhone gets the floating bottom tab bar, and so does an iPad window of compact width; a full or wide iPad window gets the top bar and the sidebar. LiquidNativeUnavailableReason.notIPadwas removed (it never shipped in a release): an iPhone is no longer a reason to keep the Flutter chrome.- Window controls:
LiquidShellScopeData.windowControls,LiquidWindowControlsClearance, and the Flutter top bar and sidebar header move past the iPadOS 26 window controls. LiquidShellScopeData.nativeChrome;LiquidNoChromepasses the window controls through.debugResetLiquidNative()for tests that swap the platform.- In debug, a shell that could use native chrome but lacks an
sfSymbollogs one line, once per shell, naming the destinations and the trailing action without one. - Example: every case with a real shell runs native on iOS 26; the cases about the Flutter chrome say so on screen.
0.1.0-dev.1 #
- Initial development release.