feat(app): short motion for collapsibles, badges, new runs and the action bar; none under reduced motion
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user