v1.1.5+35

- overlay buttons
- encrypted storage
- downloadbutton (wip)
This commit is contained in:
Flummi 2025-06-07 20:32:24 +02:00
parent 43c42ac0d5
commit 1cd10b3809
4 changed files with 35 additions and 6 deletions

View File

@ -34,7 +34,11 @@ class ThemeNotifier extends StateNotifier<ThemeData> {
final themeNotifierProvider = StateNotifierProvider<ThemeNotifier, ThemeData>((
ref,
) {
return ThemeNotifier(secureStorage: FlutterSecureStorage());
return ThemeNotifier(
secureStorage: FlutterSecureStorage(
aOptions: AndroidOptions(encryptedSharedPreferences: true),
),
);
});
class CustomTheme {

View File

@ -106,9 +106,9 @@ class _DetailViewState extends ConsumerState<DetailView> {
title: Text('f0ck #${mediaState.mediaItems[_currentIndex].id}'),
actions: [
IconButton(
icon: Icon(mediaState.muted ? Icons.volume_off : Icons.volume_up),
icon: Icon(Icons.download),
onPressed: () {
mediaNotifier.toggleMute();
// wip
},
),
PopupMenuButton<String>(

View File

@ -1,8 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:cached_video_player_plus/cached_video_player_plus.dart';
class VideoControlsOverlay extends StatelessWidget {
import 'package:f0ckapp/providers/MediaProvider.dart';
class VideoControlsOverlay extends ConsumerWidget {
final CachedVideoPlayerPlusController controller;
final VoidCallback button;
@ -13,10 +16,32 @@ class VideoControlsOverlay extends StatelessWidget {
});
@override
Widget build(BuildContext context) {
Widget build(BuildContext context, ref) {
final mediaState = ref.watch(mediaProvider);
final mediaNotifier = ref.read(mediaProvider.notifier);
return Stack(
alignment: Alignment.center,
children: [
Positioned(
right: 12,
top: 12,
child: _ControlButton(
mediaState.muted ? Icons.volume_off : Icons.volume_up,
() {
button();
mediaNotifier.toggleMute();
},
size: 16,
),
),
Positioned(
right: 12,
bottom: 12,
child: _ControlButton(Icons.fullscreen, () {
button();
}, size: 16),
),
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,

View File

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.4+34
version: 1.1.5+35
environment:
sdk: ^3.9.0-100.2.beta