mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 03:56:45 +08:00
@@ -18,13 +18,16 @@ class AppBarAni extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
visible ? controller.forward() : controller.reverse();
|
||||
return SlideTransition(
|
||||
position: Tween<Offset>(
|
||||
begin: Offset(0, position! == 'top' ? -1 : 1.1),
|
||||
end: Offset.zero,
|
||||
).animate(CurvedAnimation(
|
||||
parent: controller,
|
||||
curve: Curves.linear,
|
||||
)),
|
||||
position:
|
||||
Tween<Offset>(
|
||||
begin: Offset(0, position! == 'top' ? -1 : 1.1),
|
||||
end: Offset.zero,
|
||||
).animate(
|
||||
CurvedAnimation(
|
||||
parent: controller,
|
||||
curve: Curves.linear,
|
||||
),
|
||||
),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: position! == 'top'
|
||||
|
||||
@@ -79,16 +79,20 @@ class BottomControl extends StatelessWidget {
|
||||
}
|
||||
if ((newProgress - lastAnnouncedValue).abs() > 0.02) {
|
||||
accessibilityDebounce?.cancel();
|
||||
accessibilityDebounce =
|
||||
Timer(const Duration(milliseconds: 200), () {
|
||||
SemanticsService.announce(
|
||||
accessibilityDebounce = Timer(
|
||||
const Duration(milliseconds: 200),
|
||||
() {
|
||||
SemanticsService.announce(
|
||||
"${(newProgress * 100).round()}%",
|
||||
TextDirection.ltr);
|
||||
lastAnnouncedValue = newProgress;
|
||||
});
|
||||
TextDirection.ltr,
|
||||
);
|
||||
lastAnnouncedValue = newProgress;
|
||||
},
|
||||
);
|
||||
}
|
||||
controller
|
||||
.onUpdatedSliderProgress(duration.timeStamp);
|
||||
controller.onUpdatedSliderProgress(
|
||||
duration.timeStamp,
|
||||
);
|
||||
},
|
||||
onSeek: (duration) {
|
||||
if (controller.showSeekPreview) {
|
||||
@@ -97,11 +101,14 @@ class BottomControl extends StatelessWidget {
|
||||
controller
|
||||
..onChangedSliderEnd()
|
||||
..onChangedSlider(duration.inSeconds.toDouble())
|
||||
..seekTo(Duration(seconds: duration.inSeconds),
|
||||
type: 'slider');
|
||||
..seekTo(
|
||||
Duration(seconds: duration.inSeconds),
|
||||
type: 'slider',
|
||||
);
|
||||
SemanticsService.announce(
|
||||
"${(duration.inSeconds / max * 100).round()}%",
|
||||
TextDirection.ltr);
|
||||
"${(duration.inSeconds / max * 100).round()}%",
|
||||
TextDirection.ltr,
|
||||
);
|
||||
},
|
||||
),
|
||||
if (controller.segmentList.isNotEmpty)
|
||||
|
||||
Reference in New Issue
Block a user