v1.1.21+51
All checks were successful
Flutter Schmutter / build (push) Successful in 3m40s

This commit is contained in:
Flummi 2025-06-11 20:45:37 +02:00
parent e38d2086b3
commit 7981436374
4 changed files with 126 additions and 116 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
@ -232,10 +233,11 @@ final ThemeData f0ck95Theme = ThemeData(
onPrimary: Colors.black, onPrimary: Colors.black,
onSecondary: Colors.white, onSecondary: Colors.white,
), ),
appBarTheme: const AppBarTheme( appBarTheme: AppBarTheme(
backgroundColor: Color(0xFFC0C0C0), backgroundColor: const Color(0xFFE0E0E0),
foregroundColor: Colors.black, foregroundColor: Colors.black,
elevation: 2, elevation: 4,
centerTitle: true
), ),
textTheme: const TextTheme( textTheme: const TextTheme(
bodyLarge: TextStyle(color: Colors.black), bodyLarge: TextStyle(color: Colors.black),

View File

@ -105,9 +105,7 @@ class _DetailViewState extends ConsumerState<DetailView> {
if (itemIndex == -1) { if (itemIndex == -1) {
Future.microtask(() { Future.microtask(() {
ref ref.read(mediaProvider.notifier).loadMedia(id: widget.initialItemId + 50);
.read(mediaProvider.notifier)
.loadMedia(/*id: widget.initialItemId + 50*/);
}); });
return Scaffold( return Scaffold(
appBar: AppBar(), appBar: AppBar(),
@ -125,10 +123,28 @@ class _DetailViewState extends ConsumerState<DetailView> {
} }
return Scaffold( return Scaffold(
appBar: AppBar( endDrawer: EndDrawer(ref: ref),
persistentFooterButtons: mediaState.tag != null
? [
Center(
child: InputChip(
label: Text(mediaState.tag!),
onDeleted: () {
ref.read(mediaProvider.notifier).setTag(null);
context.go('/', extra: true);
},
),
),
]
: null,
body: CustomScrollView(
slivers: [
SliverAppBar(
floating: true,
pinned: true,
snap: true,
centerTitle: true, centerTitle: true,
title: Text('f0ck #${mediaState.mediaItems[_currentIndex].id}'), title: Text('f0ck #${mediaState.mediaItems[_currentIndex].id}'),
automaticallyImplyLeading: false,
leading: IconButton( leading: IconButton(
icon: const Icon(Icons.arrow_back), icon: const Icon(Icons.arrow_back),
onPressed: () { onPressed: () {
@ -139,7 +155,6 @@ class _DetailViewState extends ConsumerState<DetailView> {
IconButton( IconButton(
icon: const Icon(Icons.fullscreen), icon: const Icon(Icons.fullscreen),
onPressed: () { onPressed: () {
final mediaState = ref.read(mediaProvider);
final currentItem = mediaState.mediaItems[_currentIndex]; final currentItem = mediaState.mediaItems[_currentIndex];
Navigator.of(context).push( Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(
@ -204,47 +219,38 @@ class _DetailViewState extends ConsumerState<DetailView> {
icon: const Icon(Icons.share), icon: const Icon(Icons.share),
), ),
Builder( Builder(
builder: (context) { builder: (context) => IconButton(
return IconButton(
icon: const Icon(Icons.menu), icon: const Icon(Icons.menu),
onPressed: () { onPressed: () {
Scaffold.of(context).openEndDrawer(); Scaffold.of(context).openEndDrawer();
}, },
); ),
},
), ),
], ],
flexibleSpace: FlexibleSpaceBar(
background: Container(color: Colors.transparent),
), ),
endDrawer: EndDrawer(ref: ref), ),
body: Stack( SliverPadding(
children: [ padding: EdgeInsets.zero,
PageTransformer( sliver: SliverFillRemaining(
child: PageTransformer(
controller: _pageController!, controller: _pageController!,
pages: mediaState.mediaItems.map((item) { pages: mediaState.mediaItems.map((item) {
int itemIndex = mediaState.mediaItems.indexOf(item); int pageIndex = mediaState.mediaItems.indexOf(item);
return SafeArea( return SafeArea(
top: false,
child: SmartRefreshIndicator( child: SmartRefreshIndicator(
onRefresh: _loadMoreMedia, onRefresh: _loadMoreMedia,
child: _buildMediaItem(item, _currentIndex == itemIndex), child: _buildMediaItem(item, _currentIndex == pageIndex),
), ),
); );
}).toList(), }).toList(),
), ),
),
),
], ],
), ),
persistentFooterButtons: mediaState.tag != null
? [
Center(
child: InputChip(
label: Text(mediaState.tag!),
onDeleted: () {
ref.read(mediaProvider.notifier).setTag(null);
context.go('/', extra: true);
},
),
),
]
: null,
); );
} }
@ -258,8 +264,10 @@ class _DetailViewState extends ConsumerState<DetailView> {
CachedNetworkImage( CachedNetworkImage(
imageUrl: item.mediaUrl, imageUrl: item.mediaUrl,
fit: BoxFit.contain, fit: BoxFit.contain,
placeholder: (context, url) => const CircularProgressIndicator(), placeholder: (context, url) =>
errorWidget: (context, url, error) => const Icon(Icons.error), const Center(child: CircularProgressIndicator()),
errorWidget: (context, url, error) =>
const Center(child: Icon(Icons.error)),
) )
else else
VideoWidget(details: item, isActive: isActive), VideoWidget(details: item, isActive: isActive),

View File

@ -62,7 +62,7 @@ class _FullScreenMediaViewState extends State<FullScreenMediaView> {
child: Align( child: Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: IconButton( child: IconButton(
icon: const Icon(Icons.arrow_back), icon: const Icon(Icons.arrow_back, color: Colors.white),
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
), ),

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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 1.1.20+50 version: 1.1.21+51
environment: environment:
sdk: ^3.9.0-100.2.beta sdk: ^3.9.0-100.2.beta