diff --git a/lib/features/redis/redis_cli_workspace.dart b/lib/features/redis/redis_cli_workspace.dart index edd0a770..3e07177a 100644 --- a/lib/features/redis/redis_cli_workspace.dart +++ b/lib/features/redis/redis_cli_workspace.dart @@ -308,12 +308,18 @@ class _RedisCliWorkspaceState extends material.State { void _scrollToBottom() { material.WidgetsBinding.instance.addPostFrameCallback((_) { - if (_scrollController.hasClients) { + if (!mounted || !_scrollController.hasClients) return; + final end = _scrollController.position.maxScrollExtent; + final duration = context.motionDuration(QueryaMotion.fast); + // animateTo needs a non-zero duration; reduced motion jumps. + if (duration > QueryaMotion.instant) { _scrollController.animateTo( - _scrollController.position.maxScrollExtent, - duration: const Duration(milliseconds: 150), - curve: material.Curves.easeOut, + end, + duration: duration, + curve: context.motionCurve(QueryaMotion.enter), ); + } else { + _scrollController.jumpTo(end); } }); } diff --git a/lib/features/redis/redis_keys_view.dart b/lib/features/redis/redis_keys_view.dart index ed50afd1..d870a4b9 100644 --- a/lib/features/redis/redis_keys_view.dart +++ b/lib/features/redis/redis_keys_view.dart @@ -737,7 +737,8 @@ class _FolderTile extends material.StatelessWidget { children: [ material.AnimatedRotation( turns: isExpanded ? 0.25 : 0.0, - duration: const Duration(milliseconds: 150), + duration: context.motionDuration(QueryaMotion.treeExpand), + curve: context.motionCurve(QueryaMotion.treeExpandCurve), child: material.Icon( material.Icons.chevron_right_rounded, size: 18,