Top bar: every piece pops in like the tab buttons

One shared pop (pop_entrance.dart: PopTransition, popWindow, PopEntrance)
drives the floating tab buttons and the top bar, on Motion.tabEntrance*
(0.6 -> 1, 260 ms, 70 ms stagger, ease-out-back, glass fading in).
SegmentedEntrance and the barEntrance* constants are gone.

Back, the title, the actions pill and each action pop in turn from the
leading edge (SegmentedEntrancePlanner). A lone action pops once, with its
pill. A newcomer pops alone. Rebuilds and title changes never replay it.
The shell passes published actions one by one, keyed by their screen
(actionsKey), not as one cross-fading Row. The chat thread's model and mode
are separate actions. The folder picker now uses SegmentedBar.
This commit is contained in:
2026-11-03 00:30:44 +00:00
parent 2176b396ac
commit 05798a56c8
14 changed files with 709 additions and 457 deletions
@@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../core/api_gateway.dart';
import '../../data/directory_listing.dart';
import '../../../../ui/adaptive/segmented_bar.dart';
import '../sessions/chat_adaptive.dart';
import 'folder_picker_controller.dart';
import 'folder_picker_list.dart';
@@ -108,41 +108,40 @@ class _FolderPickerPageState extends State<FolderPickerPage> {
);
}
/// The app's segmented bar: Back (climbing one folder), the title, and
/// Cancel in the actions pill, each popping in like every other bar.
SegmentedBar _bar(bool cupertino) => SegmentedBar(
cupertino: cupertino,
automaticallyImplyLeading: false,
leading: SegmentedBackButton(cupertino: cupertino, onPressed: _back),
title: folderPickerTitle,
actions: [
if (cupertino)
CupertinoButton(
padding: const EdgeInsets.symmetric(horizontal: 16),
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
)
else
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
),
],
);
Widget _material(Widget body) {
return Scaffold(
appBar: AppBar(
leading: BackButton(onPressed: _back),
title: const Text(folderPickerTitle),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
),
],
),
body: SafeArea(top: false, child: body),
extendBodyBehindAppBar: true,
appBar: _bar(false),
// Inset below the floating bar, which the scaffold reports as padding.
body: SafeArea(child: body),
);
}
Widget _cupertino(BuildContext context, Widget body) {
final parent = _controller.listing?.parent;
final home = _controller.home;
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
automaticallyImplyLeading: false,
leading: CupertinoNavigationBarBackButton(
onPressed: _back,
previousPageTitle: parent == null || home == null
? 'Back'
: folderCrumbs(home, parent).last.label,
),
middle: const Text(folderPickerTitle),
trailing: CupertinoButton(
padding: EdgeInsets.zero,
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
),
),
navigationBar: _bar(true),
child: DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle,
child: SafeArea(child: body),