mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-20 19:12:04 +00:00
changed seekbar behavior
This commit is contained in:
parent
47c9b79ce9
commit
230f9c59a3
2 changed files with 41 additions and 18 deletions
|
|
@ -1103,24 +1103,6 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
fit: FlexFit.tight,
|
||||
child: ValueListenableBuilder<bool>(
|
||||
valueListenable: _isDoubleSpeed,
|
||||
builder: (context, snapshot, _) {
|
||||
return Text.rich(
|
||||
TextSpan(
|
||||
children: snapshot
|
||||
? [
|
||||
WidgetSpan(child: Icon(Icons.fast_forward)),
|
||||
TextSpan(text: " 2X"),
|
||||
]
|
||||
: [],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
btnToShowChapterListDialog(
|
||||
|
|
@ -1262,6 +1244,46 @@ class _AnimeStreamPageState extends riv.ConsumerState<AnimeStreamPage>
|
|||
height: context.height(1),
|
||||
resumeUponEnteringForegroundMode: true,
|
||||
),
|
||||
Stack(
|
||||
alignment: AlignmentDirectional.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 30,
|
||||
child: ValueListenableBuilder<bool>(
|
||||
valueListenable: _isDoubleSpeed,
|
||||
builder: (context, snapshot, _) {
|
||||
return Text.rich(
|
||||
textAlign: TextAlign.center,
|
||||
TextSpan(
|
||||
style: TextStyle(
|
||||
background: Paint()
|
||||
..color = Theme.of(context).scaffoldBackgroundColor
|
||||
..strokeWidth = 30.0
|
||||
..strokeJoin = StrokeJoin.round
|
||||
..style = PaintingStyle.stroke,
|
||||
),
|
||||
children: snapshot
|
||||
? [
|
||||
TextSpan(
|
||||
text: " 2X ",
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Icon(Icons.fast_forward),
|
||||
),
|
||||
]
|
||||
: [],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (enableAniSkip && (_hasOpeningSkip || _hasEndingSkip))
|
||||
Positioned(
|
||||
right: 0,
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ class CustomSeekBarState extends State<CustomSeekBar> {
|
|||
milliseconds: value.toInt() - position.inMilliseconds,
|
||||
),
|
||||
);
|
||||
widget.player.seek(Duration(milliseconds: value.toInt()));
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
tempPosition = Duration(milliseconds: value.toInt());
|
||||
|
|
|
|||
Loading…
Reference in a new issue