feat(app): short motion for collapsibles, badges, new runs and the action bar; none under reduced motion

This commit is contained in:
2026-10-23 22:05:30 +01:00
parent c467872ee3
commit ae43182a2b
9 changed files with 313 additions and 44 deletions
+16 -4
View File
@@ -1,3 +1,4 @@
import '../ui/motion/motion.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -145,9 +146,12 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
automaticallyImplyLeading: false,
middle: Text(spec?.title ?? details.label),
trailing: spec != null && spec.actions.isNotEmpty
? Row(
mainAxisSize: MainAxisSize.min,
children: spec.actions,
? MotionSwitcher(
child: Row(
key: ObjectKey(_bar.ownerFor(_selected)),
mainAxisSize: MainAxisSize.min,
children: spec.actions,
),
)
: widget.onSearch == null
? null
@@ -209,7 +213,15 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
),
title: Text(spec?.title ?? details.label),
actions: [
...?spec?.actions,
if (spec != null && spec.actions.isNotEmpty)
// A screen taking the bar over cross-fades its actions in.
MotionSwitcher(
child: Row(
key: ObjectKey(_bar.ownerFor(_selected)),
mainAxisSize: MainAxisSize.min,
children: spec.actions,
),
),
if (widget.onSearch != null && (spec?.actions.isEmpty ?? true))
IconButton(
key: const ValueKey('shell.search'),