merge: 收窄拖动清屏范围并提升灵敏度
This commit is contained in:
commit
7599da1d40
4 files changed
+18
-4
No files matched your search
@@ -1184,6 +1184,6 @@ $ flutter test
|
||||
- 剧名 19/w600,箭头 20 白色并紧邻剧名;标签行改为 13/w600 亮灰内联布局。
|
||||
- 简介「展开/收起」沿用现有三语文案;进度条热区恢复 24 并接入拖动自动清屏与预览卡片。
|
||||
- 拖动仅控制视频浮层内容,顶部导航与根底栏保持常驻。
|
||||
- 进度条固定中心并动画到 6 高,时间气泡限制在左右 12;end/cancel/pointer 兜底均恢复拖动前状态。
|
||||
- 进度条固定中心并动画到 6 高,命中高度 32,时间气泡限制在左右 12;end/cancel/pointer 兜底均恢复拖动前状态。
|
||||
- 修复 `scrubCancelRequest` 误置于 `initState` 的编译错误,并清理推荐页未使用变量;`flutter analyze` 无问题。
|
||||
- 观看全集按钮相对进度条上移 8,间距调整为 20;按钮改为屏幕宽度 70% 左对齐,`flutter analyze` 无问题。
|
||||
@@ -3,6 +3,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
||||
@@ -18,11 +19,11 @@ import 'seek_progress_bar.dart';
|
||||
part 'home_feed_overlay_parts.dart';
|
||||
|
||||
const double _progressHeight = 2;
|
||||
const double _progressHitHeight = 28;
|
||||
const double _progressHitHeight = 32;
|
||||
const double _pageHorizontal = 14;
|
||||
const double _railRight = 8;
|
||||
const double _railGap = 12;
|
||||
const double _bottomInfoInset = 20;
|
||||
const double _bottomInfoInset = 32;
|
||||
const double _railBottomOffset = 60;
|
||||
const List<Shadow> _boostTextShadows = [
|
||||
Shadow(color: AppColors.shadow, blurRadius: 5, offset: Offset(0, 1)),
|
||||
|
||||
@@ -129,6 +129,7 @@ class _FeedProgressBarState extends State<_FeedProgressBar> {
|
||||
child: GestureDetector(
|
||||
key: const Key('home-feed-progress'),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
dragStartBehavior: DragStartBehavior.down,
|
||||
onHorizontalDragStart: interactive
|
||||
? (details) => _startScrub(details.localPosition.dx / width)
|
||||
: null,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:shared_preferences_platform_interface/in_memory_shared_preferences_async.dart';
|
||||
@@ -664,6 +665,11 @@ void main() {
|
||||
);
|
||||
expect(bar.left, closeTo(overlayRect.left + 14, 0.1));
|
||||
expect(bar.width, closeTo(overlayRect.width * 0.7, 1));
|
||||
expect(
|
||||
tester.getCenter(find.byKey(const Key('home-feed-progress-track'))).dy -
|
||||
bar.bottom,
|
||||
greaterThanOrEqualTo(20),
|
||||
);
|
||||
final buttonBackground =
|
||||
tester
|
||||
.widget<DecoratedBox>(
|
||||
@@ -685,7 +691,13 @@ void main() {
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-feed-progress'))).height,
|
||||
greaterThanOrEqualTo(28),
|
||||
greaterThanOrEqualTo(32),
|
||||
);
|
||||
expect(
|
||||
tester
|
||||
.widget<GestureDetector>(find.byKey(const Key('home-feed-progress')))
|
||||
.dragStartBehavior,
|
||||
DragStartBehavior.down,
|
||||
);
|
||||
final idleTrackCenter = tester
|
||||
.getRect(find.byKey(const Key('home-feed-progress-track')))
|
||||
|
||||
Reference in new issue
Block a user