Skip to content

Commit 03f24a6

Browse files
authored
feat(mobile): add iOS Liquid Glass tabs and quick actions (#8080)
## Summary Use native Liquid Glass for the iOS tab bar and expanding + menu, preserving the existing Lucide icons, icon-only layout, badges, accessibility labels, and tab interactions. The + uses black-tinted glass with white controls; the selected tab has a subtle theme accent (6% blended into the existing selection color). Android retains its current styling. ### Related issue No duplicate issue found. Related prior navigation work: #7281 (closed). This change covers the tab bar and quick actions; it does not add page-to-page navigation-bar morphing. ### Testing - `just mobile-check` passed (formatting, analysis, and file-size checks). - `just mobile-test` passed: 2,678 tests passed, 4 skipped; the separate unconfigured-push suite also passed all 3 tests. - Widget coverage verifies native glass parameters, black + tint, original icons, icon-only layout, tab selection, badges, and quick-menu open/close behavior. - Signed Release iOS build installed and launched on a physical iPhone; the final glass and tint styling was reviewed on device. No final-app screenshot was captured. - Full `just ci` was attempted but stopped during desktop compilation as available disk space dropped to 3.5 GiB. The complete repository-wide gate is not locally verified; hosted CI remains pending. Signed-off-by: kenny lopez <[email protected]>
1 parent d2da104 commit 03f24a6

6 files changed

Lines changed: 276 additions & 89 deletions

File tree

‎mobile/ios/Runner/ConcentricSheetSurface.swift‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ final class ConcentricSheetSurfacePlatformView: NSObject, FlutterPlatformView {
7676

7777
updateColors(
7878
colorValue: colorValue,
79-
backdropColorValue: backdropColorValue
79+
backdropColorValue: backdropColorValue,
80+
glassTintColorValue: (arguments?["glassTintColor"] as? NSNumber)?.uint32Value
8081
)
8182
applyInterfaceStyle(from: arguments?["brightness"])
8283
applyCornerConfiguration(minimumRadius: minimumRadius)
@@ -104,7 +105,8 @@ final class ConcentricSheetSurfacePlatformView: NSObject, FlutterPlatformView {
104105

105106
self.updateColors(
106107
colorValue: colorValue.uint32Value,
107-
backdropColorValue: (arguments["backdropColor"] as? NSNumber)?.uint32Value
108+
backdropColorValue: (arguments["backdropColor"] as? NSNumber)?.uint32Value,
109+
glassTintColorValue: (arguments["glassTintColor"] as? NSNumber)?.uint32Value
108110
)
109111
result(nil)
110112
case "updateGeometry":
@@ -140,9 +142,17 @@ final class ConcentricSheetSurfacePlatformView: NSObject, FlutterPlatformView {
140142
rootView
141143
}
142144

143-
private func updateColors(colorValue: UInt32, backdropColorValue: UInt32?) {
145+
private func updateColors(
146+
colorValue: UInt32,
147+
backdropColorValue: UInt32?,
148+
glassTintColorValue: UInt32?
149+
) {
144150
let surfaceColor = Self.color(from: colorValue)
145151
if let glassView = surfaceView as? UIVisualEffectView {
152+
if #available(iOS 26.0, *), let effect = glassView.effect as? UIGlassEffect {
153+
effect.tintColor = glassTintColorValue.map { Self.color(from: $0) }
154+
glassView.effect = effect
155+
}
146156
glassView.backgroundColor = .clear
147157
glassView.contentView.backgroundColor = surfaceColor.withAlphaComponent(0.12)
148158
} else {

‎mobile/lib/features/channels/channels_page.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import '../../shared/widgets/avatar_image.dart';
2222
import '../../shared/widgets/anchored_popover_menu.dart';
2323
import '../../shared/widgets/bee_refresh_indicator.dart';
2424
import '../../shared/widgets/buzz_loading_indicator.dart';
25+
import '../../shared/widgets/concentric_sheet_surface.dart';
2526
import '../../shared/widgets/frosted_app_bar.dart';
2627
import '../../shared/widgets/ios_navigation_bar.dart';
2728
import '../../shared/widgets/frosted_scaffold.dart';

‎mobile/lib/features/channels/channels_page/quick_actions.dart‎

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,8 @@ class _MorphingQuickActionsButton extends HookWidget {
122122
key: const Key('quick-actions-surface'),
123123
width: width,
124124
height: height,
125-
child: DecoratedBox(
126-
decoration: BoxDecoration(
127-
color: context.colors.primary,
128-
borderRadius: borderRadius,
129-
boxShadow: [
130-
BoxShadow(
131-
color: context.colors.shadow.withValues(alpha: 0.24),
132-
blurRadius: 12,
133-
offset: const Offset(0, 4),
134-
),
135-
],
136-
),
125+
child: _QuickActionsSurface(
126+
radius: radius,
137127
child: ClipRRect(
138128
borderRadius: borderRadius,
139129
clipBehavior: Clip.antiAlias,
@@ -221,7 +211,11 @@ class _MorphingQuickActionsButton extends HookWidget {
221211
child: Center(
222212
child: Icon(
223213
LucideIcons.plus,
224-
color: context.colors.onPrimary,
214+
color:
215+
defaultTargetPlatform ==
216+
TargetPlatform.iOS
217+
? Colors.white
218+
: context.colors.onPrimary,
225219
),
226220
),
227221
),
@@ -247,6 +241,45 @@ class _MorphingQuickActionsButton extends HookWidget {
247241
}
248242
}
249243

244+
class _QuickActionsSurface extends StatelessWidget {
245+
const _QuickActionsSurface({required this.radius, required this.child});
246+
247+
final double radius;
248+
final Widget child;
249+
250+
@override
251+
Widget build(BuildContext context) {
252+
final isIos = defaultTargetPlatform == TargetPlatform.iOS;
253+
return DecoratedBox(
254+
decoration: BoxDecoration(
255+
color: isIos ? null : context.colors.primary,
256+
borderRadius: BorderRadius.circular(radius),
257+
boxShadow: [
258+
BoxShadow(
259+
color: context.colors.shadow.withValues(alpha: isIos ? 0.10 : 0.24),
260+
blurRadius: isIos ? 20 : 12,
261+
offset: Offset(0, isIos ? 8 : 4),
262+
),
263+
],
264+
),
265+
child: isIos
266+
? ConcentricSheetSurface(
267+
key: const ValueKey('quick-actions-ios-glass'),
268+
enabled: true,
269+
usesGlass: true,
270+
glassTintColor: Colors.black,
271+
color: Colors.black,
272+
providesSheetSurface: false,
273+
padding: EdgeInsets.zero,
274+
minimumRadius: radius,
275+
contentClipRadius: radius,
276+
child: child,
277+
)
278+
: child,
279+
);
280+
}
281+
}
282+
250283
class _QuickActionsMenu extends StatelessWidget {
251284
final ValueChanged<_QuickAction> onSelected;
252285

@@ -301,11 +334,14 @@ class _QuickActionItem extends StatelessWidget {
301334

302335
@override
303336
Widget build(BuildContext context) {
304-
final foreground = context.colors.onPrimary;
305-
final background = Color.alphaBlend(
306-
foreground.withValues(alpha: _kQuickActionCardOverlayOpacity),
307-
context.colors.primary,
308-
);
337+
final isIos = defaultTargetPlatform == TargetPlatform.iOS;
338+
final foreground = isIos ? Colors.white : context.colors.onPrimary;
339+
final background = isIos
340+
? foreground.withValues(alpha: _kQuickActionCardOverlayOpacity)
341+
: Color.alphaBlend(
342+
foreground.withValues(alpha: _kQuickActionCardOverlayOpacity),
343+
context.colors.primary,
344+
);
309345

310346
return Expanded(
311347
child: Material(

‎mobile/lib/features/home/home_page.dart‎

Lines changed: 88 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import 'dart:async';
22
import 'dart:ui';
33

4+
import 'package:flutter/foundation.dart';
45
import 'package:flutter/material.dart';
56
import 'package:flutter/services.dart';
67
import 'package:flutter_hooks/flutter_hooks.dart';
78
import 'package:hooks_riverpod/hooks_riverpod.dart';
89
import 'package:lucide_icons_flutter/lucide_icons.dart';
910

1011
import '../../shared/theme/theme.dart';
12+
import '../../shared/widgets/concentric_sheet_surface.dart';
1113
import '../../shared/widgets/directional_transition_scope.dart';
1214
import '../../shared/widgets/mobile_tab_footer_backdrop.dart';
1315
import '../activity/activity_page.dart';
@@ -331,28 +333,69 @@ class _FloatingTabBar extends StatelessWidget {
331333
destinationCount,
332334
);
333335

334-
return SafeArea(
335-
minimum: const EdgeInsets.fromLTRB(
336-
HomePage._tabBarHorizontalMargin,
337-
0,
338-
HomePage._tabBarHorizontalMargin,
339-
HomePage._tabBarBottomGap,
340-
),
341-
child: Align(
342-
alignment: Alignment.bottomCenter,
343-
heightFactor: 1,
344-
child: DecoratedBox(
345-
decoration: BoxDecoration(
346-
borderRadius: BorderRadius.circular(HomePage._tabBarRadius),
347-
boxShadow: [
348-
BoxShadow(
349-
color: colorScheme.shadow.withValues(alpha: 0.10),
350-
blurRadius: 20,
351-
offset: const Offset(0, 8),
336+
final content = Padding(
337+
padding: const EdgeInsets.all(HomePage._tabBarInnerInset),
338+
child: SizedBox(
339+
height: HomePage._tabBarHeight - (HomePage._tabBarInnerInset * 2),
340+
width: destinationWidth * destinationCount,
341+
child: Stack(
342+
children: [
343+
AnimatedAlign(
344+
alignment: selectedAlignment,
345+
duration: reducedMotion
346+
? Duration.zero
347+
: const Duration(milliseconds: 180),
348+
curve: Curves.easeOutCubic,
349+
child: SizedBox(
350+
width: destinationWidth,
351+
height: double.infinity,
352+
child: DecoratedBox(
353+
decoration: BoxDecoration(
354+
color: defaultTargetPlatform == TargetPlatform.iOS
355+
? Color.alphaBlend(
356+
colorScheme.primary.withValues(alpha: 0.06),
357+
colorScheme.primaryContainer,
358+
)
359+
: colorScheme.primaryContainer,
360+
borderRadius: BorderRadius.circular(
361+
HomePage._selectedTabRadius,
362+
),
363+
),
364+
),
352365
),
353-
],
354-
),
355-
child: ClipRRect(
366+
),
367+
Row(
368+
crossAxisAlignment: CrossAxisAlignment.stretch,
369+
children: [
370+
for (var i = 0; i < destinations.length; i++)
371+
SizedBox(
372+
width: destinationWidth,
373+
child: _FloatingTabDestination(
374+
destination: destinations[i],
375+
selected: i == safeSelectedIndex,
376+
showUnreadBadge: i == 1 && hasUnreadInbox,
377+
onTap: () => onDestinationSelected(i),
378+
),
379+
),
380+
],
381+
),
382+
],
383+
),
384+
),
385+
);
386+
387+
final surface = defaultTargetPlatform == TargetPlatform.iOS
388+
? ConcentricSheetSurface(
389+
key: const ValueKey('home-ios-glass-tabs'),
390+
enabled: true,
391+
usesGlass: true,
392+
providesSheetSurface: false,
393+
padding: EdgeInsets.zero,
394+
minimumRadius: HomePage._tabBarRadius,
395+
contentClipRadius: HomePage._tabBarRadius,
396+
child: content,
397+
)
398+
: ClipRRect(
356399
borderRadius: BorderRadius.circular(HomePage._tabBarRadius),
357400
child: BackdropFilter(
358401
filter: ImageFilter.blur(sigmaX: 18, sigmaY: 18),
@@ -370,56 +413,33 @@ class _FloatingTabBar extends StatelessWidget {
370413
),
371414
),
372415
),
373-
child: Padding(
374-
padding: const EdgeInsets.all(HomePage._tabBarInnerInset),
375-
child: SizedBox(
376-
height:
377-
HomePage._tabBarHeight -
378-
(HomePage._tabBarInnerInset * 2),
379-
width: destinationWidth * destinationCount,
380-
child: Stack(
381-
children: [
382-
AnimatedAlign(
383-
alignment: selectedAlignment,
384-
duration: reducedMotion
385-
? Duration.zero
386-
: const Duration(milliseconds: 180),
387-
curve: Curves.easeOutCubic,
388-
child: SizedBox(
389-
width: destinationWidth,
390-
height: double.infinity,
391-
child: DecoratedBox(
392-
decoration: BoxDecoration(
393-
color: colorScheme.primaryContainer,
394-
borderRadius: BorderRadius.circular(
395-
HomePage._selectedTabRadius,
396-
),
397-
),
398-
),
399-
),
400-
),
401-
Row(
402-
crossAxisAlignment: CrossAxisAlignment.stretch,
403-
children: [
404-
for (var i = 0; i < destinations.length; i++)
405-
SizedBox(
406-
width: destinationWidth,
407-
child: _FloatingTabDestination(
408-
destination: destinations[i],
409-
selected: i == safeSelectedIndex,
410-
showUnreadBadge: i == 1 && hasUnreadInbox,
411-
onTap: () => onDestinationSelected(i),
412-
),
413-
),
414-
],
415-
),
416-
],
417-
),
418-
),
419-
),
416+
child: content,
420417
),
421418
),
419+
);
420+
421+
return SafeArea(
422+
minimum: const EdgeInsets.fromLTRB(
423+
HomePage._tabBarHorizontalMargin,
424+
0,
425+
HomePage._tabBarHorizontalMargin,
426+
HomePage._tabBarBottomGap,
427+
),
428+
child: Align(
429+
alignment: Alignment.bottomCenter,
430+
heightFactor: 1,
431+
child: DecoratedBox(
432+
decoration: BoxDecoration(
433+
borderRadius: BorderRadius.circular(HomePage._tabBarRadius),
434+
boxShadow: [
435+
BoxShadow(
436+
color: colorScheme.shadow.withValues(alpha: 0.10),
437+
blurRadius: 20,
438+
offset: const Offset(0, 8),
439+
),
440+
],
422441
),
442+
child: surface,
423443
),
424444
),
425445
);

‎mobile/lib/shared/widgets/concentric_sheet_surface.dart‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class ConcentricSheetSurface extends HookWidget {
2626
),
2727
this.providesSheetSurface = true,
2828
this.usesGlass = false,
29+
this.glassTintColor,
2930
this.minimumRadius = Radii.dialog,
3031
this.contentClipRadius,
3132
super.key,
@@ -39,6 +40,9 @@ class ConcentricSheetSurface extends HookWidget {
3940
final EdgeInsetsGeometry padding;
4041
final bool providesSheetSurface;
4142
final bool usesGlass;
43+
44+
/// Optional tint applied to the native Liquid Glass material.
45+
final Color? glassTintColor;
4246
final double minimumRadius;
4347
final double? contentClipRadius;
4448

@@ -80,6 +84,7 @@ class ConcentricSheetSurface extends HookWidget {
8084
await channel.invokeMethod<void>('updateColors', <String, Object?>{
8185
'color': surfaceColor.toARGB32(),
8286
'backdropColor': backdropColor?.toARGB32(),
87+
'glassTintColor': glassTintColor?.toARGB32(),
8388
});
8489
} on MissingPluginException {
8590
// The platform view may have been disposed while its theme was changing.
@@ -142,6 +147,7 @@ class ConcentricSheetSurface extends HookWidget {
142147
nativeSurfaceChannel.value,
143148
surfaceColor,
144149
backdropColor,
150+
glassTintColor,
145151
],
146152
);
147153
useEffect(
@@ -199,6 +205,8 @@ class ConcentricSheetSurface extends HookWidget {
199205
'minimumRadius': minimumRadius,
200206
'corners': corners.name,
201207
'usesGlass': usesGlass,
208+
if (glassTintColor case final tint?)
209+
'glassTintColor': tint.toARGB32(),
202210
'brightness': brightness.name,
203211
},
204212
creationParamsCodec: const StandardMessageCodec(),

0 commit comments

Comments
 (0)