mirror of
https://github.com/block/buzz.git
synced 2026-11-13 21:01:53 +00:00
Duo keeps conversations and Settings details open across closed, book and flat postures. Book mode splits at the fold; flattening restores the sidebar. Native rail controls, full-width navigation backdrops and sheet-local safe areas keep content aligned. Ordinary iPhones remain single-pane in portrait and landscape; tablet and Duo split layouts remain enabled. Includes the recovered preview's matching pane widths, Buzz empty-pane mark, stable Settings chevrons, Bestie pane routing and Duo-only upward New menu attachment. Current main's Activity redesign, Search content fade and unread-navigation button are retained. Menu selection checks sit beside their labels. Shared mobile changes remain in scope: the native iOS status editor, Appearance preview layout, avatar crop preservation, onboarding footer layout, profile/invite sheet geometry and nested conversation navigation. This PR is not exclusively Duo-gated. Nested navigator observers preserve recording cancellation and navigation callbacks; crop resizing preserves the selected image region. iOS 27.1 APIs remain compile-time and runtime gated. Validation on the reconciled source: Flutter analysis, Activity/Home journeys, the full mobile test suite, file-size checks and Swift package tests. The iPhone single-pane fix was also exercised on an iPhone 18 Pro simulator before reconciliation. Fresh hosted CI and physical-device confirmation of the reconciled build are separate and remain pending. --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Tom Brow <tomb@squareup.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Tom Brow <tomb@block.xyz> Co-authored-by: Tom Brow <tomb@squareup.com>
67 lines
1.8 KiB
Dart
67 lines
1.8 KiB
Dart
import 'dart:ui';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../theme/theme.dart';
|
|
import 'ios_navigation_bar.dart';
|
|
import 'duo_toolbar.dart';
|
|
|
|
/// The shared top-edge treatment, independent of a header's controls.
|
|
///
|
|
/// iOS uses the same native soft edge as [IosNavigationBar]. Other platforms
|
|
/// use Home's translucent Flutter blur. The child remains interactive and
|
|
/// supplies its own safe-area padding.
|
|
class NavigationBackdrop extends StatelessWidget {
|
|
const NavigationBackdrop({
|
|
super.key,
|
|
required this.child,
|
|
this.active = true,
|
|
this.suppressNativeView = false,
|
|
});
|
|
|
|
final Widget child;
|
|
|
|
/// Activates the Flutter blur; UIKit owns native scroll-edge visibility.
|
|
final bool active;
|
|
|
|
/// Flutter backdrop transitions cannot composite over a native platform view.
|
|
final bool suppressNativeView;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
if (defaultTargetPlatform == TargetPlatform.iOS && !suppressNativeView) {
|
|
return Stack(
|
|
children: [
|
|
Positioned.fill(
|
|
child: IgnorePointer(
|
|
child: ExcludeSemantics(
|
|
child: IosNavigationBar(
|
|
title: '',
|
|
centerTitleInPane:
|
|
DuoToolbarScope.maybeOf(context)?.strip != null,
|
|
backdropOnly: true,
|
|
alwaysFrosted: true,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
child,
|
|
],
|
|
);
|
|
}
|
|
return ClipRect(
|
|
child: BackdropFilter(
|
|
enabled: active,
|
|
filter: ImageFilter.blur(sigmaX: 20, sigmaY: 20),
|
|
child: ColoredBox(
|
|
color: active
|
|
? context.colors.surface.withValues(alpha: 0.45)
|
|
: Colors.transparent,
|
|
child: child,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|