Compare commits
3 Commits
v1.1.15+45
...
v1.1.18+48
Author | SHA1 | Date | |
---|---|---|---|
82fb23dbfd | |||
13f957f016 | |||
707f14c5fb |
@ -3,7 +3,7 @@ name: Flutter Schmutter
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -52,8 +52,10 @@ jobs:
|
|||||||
build/app/outputs/flutter-apk/app-release.apk
|
build/app/outputs/flutter-apk/app-release.apk
|
||||||
token: '${{secrets.RELEASE_TOKEN}}'
|
token: '${{secrets.RELEASE_TOKEN}}'
|
||||||
|
|
||||||
- name: wait for gitea to catch up xD
|
- name: upload apk to f-droid server
|
||||||
run: sleep 5
|
run: |
|
||||||
|
BUILD_NUMBER=$(grep '^version:' pubspec.yaml | sed 's/.*+//')
|
||||||
- name: trigger fdroid puller
|
curl -X POST "https://flumm.io/pullfdroid.php" \
|
||||||
run: curl https://flumm.io/pullfdroid.php?token=${{secrets.PULLER_TOKEN}}
|
-F "token=${{ secrets.PULLER_TOKEN }}" \
|
||||||
|
-F "apk=@build/app/outputs/flutter-apk/app-release.apk" \
|
||||||
|
-F "build=$BUILD_NUMBER"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<application
|
<application
|
||||||
android:label="f0ckapp"
|
android:label="f0ck"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:enableOnBackInvokedCallback="true">
|
android:enableOnBackInvokedCallback="true">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
import 'package:f0ckapp/screens/fullscreen_screen.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
@ -133,7 +134,13 @@ class _DetailViewState extends ConsumerState<DetailView> {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.fullscreen),
|
icon: const Icon(Icons.fullscreen),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showMsg('fullscreen ist wip');
|
final mediaState = ref.read(mediaProvider);
|
||||||
|
final currentItem = mediaState.mediaItems[_currentIndex];
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (_) => FullScreenMediaView(item: currentItem),
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
101
lib/screens/fullscreen_screen.dart
Normal file
101
lib/screens/fullscreen_screen.dart
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
|
||||||
|
import 'package:f0ckapp/models/mediaitem_model.dart';
|
||||||
|
import 'package:f0ckapp/widgets/video_widget.dart';
|
||||||
|
|
||||||
|
class FullScreenMediaView extends StatefulWidget {
|
||||||
|
final MediaItem item;
|
||||||
|
|
||||||
|
const FullScreenMediaView({super.key, required this.item});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State createState() => _FullScreenMediaViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FullScreenMediaViewState extends State<FullScreenMediaView> {
|
||||||
|
double _dragOffset = 0.0;
|
||||||
|
int _pointerCount = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
SystemChrome.setPreferredOrientations(DeviceOrientation.values);
|
||||||
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||||
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onVerticalDragUpdate(DragUpdateDetails details) {
|
||||||
|
if (_pointerCount != 1) return;
|
||||||
|
setState(() => _dragOffset += details.delta.dy);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onVerticalDragEnd(DragEndDetails details) {
|
||||||
|
if (_dragOffset < -100 || _dragOffset > 100) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
} else {
|
||||||
|
setState(() => _dragOffset = 0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
body: Listener(
|
||||||
|
onPointerDown: (_) {
|
||||||
|
setState(() => _pointerCount++);
|
||||||
|
},
|
||||||
|
onPointerUp: (_) {
|
||||||
|
setState(() => _pointerCount = (_pointerCount - 1).clamp(0, 10));
|
||||||
|
},
|
||||||
|
child: GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onVerticalDragUpdate: _onVerticalDragUpdate,
|
||||||
|
onVerticalDragEnd: _onVerticalDragEnd,
|
||||||
|
child: Transform.translate(
|
||||||
|
offset: Offset(0, _dragOffset),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: widget.item.mime.startsWith('image')
|
||||||
|
? InteractiveViewer(
|
||||||
|
minScale: 1.0,
|
||||||
|
maxScale: 4.0,
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl: widget.item.mediaUrl,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
placeholder: (context, url) => const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
errorWidget: (context, url, error) =>
|
||||||
|
const Icon(Icons.error, color: Colors.white),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: VideoWidget(details: widget.item, isActive: true),
|
||||||
|
),
|
||||||
|
SafeArea(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: IconButton(
|
||||||
|
icon: const Icon(Icons.arrow_back, color: Colors.white),
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -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.15+45
|
version: 1.1.18+48
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.9.0-100.2.beta
|
sdk: ^3.9.0-100.2.beta
|
||||||
|
Reference in New Issue
Block a user