mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
fix: Lots of navigation improvements
This commit is contained in:
parent
c299492d6d
commit
5174bb3a6c
55 changed files with 1019 additions and 832 deletions
|
|
@ -1,9 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/models/items/chapters_model.dart';
|
||||
import 'package:fladder/screens/shared/flat_button.dart';
|
||||
import 'package:fladder/widgets/shared/horizontal_list.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
void showPlayerChapterDialogue(
|
||||
BuildContext context, {
|
||||
|
|
@ -45,7 +47,7 @@ class VideoPlayerChapters extends ConsumerWidget {
|
|||
startIndex: chapters.indexOf(currentChapter ?? chapters.first),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
items: chapters.toList(),
|
||||
itemBuilder: (context, index, selected) {
|
||||
itemBuilder: (context, index) {
|
||||
final chapter = chapters[index];
|
||||
final isCurrent = chapter == currentChapter;
|
||||
return Card(
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class _VideoPlayerNextWrapperState extends ConsumerState<VideoPlayerNextWrapper>
|
|||
}
|
||||
|
||||
Future<void> clearOverlaySettings() async {
|
||||
if (AdaptiveLayout.of(context).inputDevice != InputDevice.pointer) {
|
||||
if (AdaptiveLayout.inputDeviceOf(context) != InputDevice.pointer) {
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
} else {
|
||||
fullScreenHelper.closeFullScreen(ref);
|
||||
|
|
|
|||
|
|
@ -95,10 +95,10 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
children: [
|
||||
Positioned.fill(
|
||||
child: GestureDetector(
|
||||
onTap: AdaptiveLayout.of(context).inputDevice == InputDevice.pointer
|
||||
onTap: AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer
|
||||
? () => player.playOrPause()
|
||||
: () => toggleOverlay(),
|
||||
onDoubleTap: AdaptiveLayout.of(context).inputDevice == InputDevice.pointer
|
||||
onDoubleTap: AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer
|
||||
? () => fullScreenHelper.toggleFullScreen(ref)
|
||||
: null,
|
||||
),
|
||||
|
|
@ -245,7 +245,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.touch)
|
||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.touch)
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Tooltip(
|
||||
|
|
@ -362,7 +362,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer)
|
||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer)
|
||||
Tooltip(
|
||||
message: context.localized.stop,
|
||||
child: IconButton(
|
||||
|
|
@ -379,7 +379,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
),
|
||||
),
|
||||
},
|
||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer &&
|
||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer &&
|
||||
AdaptiveLayout.viewSizeOf(context) > ViewSize.phone) ...[
|
||||
VideoVolumeSlider(
|
||||
onChanged: () => resetTimer(),
|
||||
|
|
@ -651,7 +651,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
|
||||
Future<void> clearOverlaySettings() async {
|
||||
toggleOverlay(value: true);
|
||||
if (AdaptiveLayout.of(context).inputDevice != InputDevice.pointer) {
|
||||
if (AdaptiveLayout.inputDeviceOf(context) != InputDevice.pointer) {
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
} else {
|
||||
disableFullScreen();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue