mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -07:00
fix: Small bugfix for windows
This commit is contained in:
parent
75c2f958b4
commit
24d6eb52b9
2 changed files with 28 additions and 22 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
|
@ -34,30 +37,32 @@ class VideoPlayerSettingsProviderNotifier extends StateNotifier<VideoPlayerSetti
|
||||||
ref.read(videoPlayerProvider.notifier).init();
|
ref.read(videoPlayerProvider.notifier).init();
|
||||||
}
|
}
|
||||||
final userData = ref.read(userProvider);
|
final userData = ref.read(userProvider);
|
||||||
pigeon.PlayerSettingsPigeon().sendPlayerSettings(
|
if (!kIsWeb && Platform.isAndroid) {
|
||||||
pigeon.PlayerSettings(
|
pigeon.PlayerSettingsPigeon().sendPlayerSettings(
|
||||||
enableTunneling: value.enableTunneling,
|
pigeon.PlayerSettings(
|
||||||
skipTypes: value.segmentSkipSettings.map(
|
enableTunneling: value.enableTunneling,
|
||||||
(key, value) => MapEntry(
|
skipTypes: value.segmentSkipSettings.map(
|
||||||
switch (key) {
|
(key, value) => MapEntry(
|
||||||
MediaSegmentType.unknown => pigeon.SegmentType.intro,
|
switch (key) {
|
||||||
MediaSegmentType.commercial => pigeon.SegmentType.commercial,
|
MediaSegmentType.unknown => pigeon.SegmentType.intro,
|
||||||
MediaSegmentType.preview => pigeon.SegmentType.preview,
|
MediaSegmentType.commercial => pigeon.SegmentType.commercial,
|
||||||
MediaSegmentType.recap => pigeon.SegmentType.recap,
|
MediaSegmentType.preview => pigeon.SegmentType.preview,
|
||||||
MediaSegmentType.outro => pigeon.SegmentType.outro,
|
MediaSegmentType.recap => pigeon.SegmentType.recap,
|
||||||
MediaSegmentType.intro => pigeon.SegmentType.intro,
|
MediaSegmentType.outro => pigeon.SegmentType.outro,
|
||||||
},
|
MediaSegmentType.intro => pigeon.SegmentType.intro,
|
||||||
switch (value) {
|
},
|
||||||
SegmentSkip.none => pigeon.SegmentSkip.none,
|
switch (value) {
|
||||||
SegmentSkip.askToSkip => pigeon.SegmentSkip.ask,
|
SegmentSkip.none => pigeon.SegmentSkip.none,
|
||||||
SegmentSkip.skip => pigeon.SegmentSkip.skip,
|
SegmentSkip.askToSkip => pigeon.SegmentSkip.ask,
|
||||||
},
|
SegmentSkip.skip => pigeon.SegmentSkip.skip,
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
skipBackward: (userData?.userSettings?.skipBackDuration ?? const Duration(seconds: 15)).inMilliseconds,
|
||||||
|
skipForward: (userData?.userSettings?.skipForwardDuration ?? const Duration(seconds: 30)).inMilliseconds,
|
||||||
),
|
),
|
||||||
skipBackward: (userData?.userSettings?.skipBackDuration ?? const Duration(seconds: 15)).inMilliseconds,
|
);
|
||||||
skipForward: (userData?.userSettings?.skipForwardDuration ?? const Duration(seconds: 30)).inMilliseconds,
|
}
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setScreenBrightness(double? value) async {
|
void setScreenBrightness(double? value) async {
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ class CustomKeyboardState extends State<CustomKeyboardWrapper> {
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
AnimatedSize(
|
AnimatedSize(
|
||||||
duration: const Duration(milliseconds: 125),
|
duration: const Duration(milliseconds: 125),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue