From f94d6545655f590ccd745cc496be661d01aeb2c6 Mon Sep 17 00:00:00 2001 From: Flummi Date: Sat, 31 May 2025 21:44:56 +0200 Subject: [PATCH] version bump to 1.0.1 --- lib/widgets/video_widget.dart.old | 92 ------------------------------- pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 lib/widgets/video_widget.dart.old diff --git a/lib/widgets/video_widget.dart.old b/lib/widgets/video_widget.dart.old deleted file mode 100644 index 94d7b7b..0000000 --- a/lib/widgets/video_widget.dart.old +++ /dev/null @@ -1,92 +0,0 @@ -import 'package:f0ckapp/models/mediaitem_detail.dart'; -import 'package:flutter/material.dart'; -import 'package:media_kit/media_kit.dart'; -import 'package:media_kit_video/media_kit_video.dart'; - -class VideoWidget extends StatefulWidget { - final MediaItemDetail details; - const VideoWidget({super.key, required this.details}); - - @override - State createState() => _VideoWidgetState(); -} - -class _VideoWidgetState extends State { - late final Player _player; - late final VideoController _controller; - double? _aspectRatio; - - @override - void initState() { - super.initState(); - _player = Player(); - _controller = VideoController(_player); - _player.open(Media(widget.details.mediaUrl)); - _player.setPlaylistMode(PlaylistMode.loop); - _player.setVolume(0); - - //_player.stream.height.first; - _player.stream.playing.listen((blah) { - setState(() { - Future.microtask(() async { - int h = await _player.stream.height.first ?? 0; - int w = await _player.stream.width.first ?? 0; - _aspectRatio = h / w; - print(_aspectRatio); - }); - }); - }); - } - - @override - void dispose() { - _player.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - //_aspectRatio = _controller.player.state.height! / _controller.player.state.width!; - print(_aspectRatio); - - return Scaffold( - appBar: AppBar( - backgroundColor: const Color.fromARGB(255, 43, 43, 43), - foregroundColor: const Color.fromARGB(255, 255, 255, 255), - title: Text('f0ck #${widget.details.id}'), - centerTitle: true, - ), - body: Column( - children: [ - if (_aspectRatio != null) - AspectRatio( - aspectRatio: _aspectRatio!, - child: Video( - controller: _controller, - fit: BoxFit.cover, - alignment: Alignment.topCenter, - ), - ) - else - SizedBox( - width: double.infinity, - height: MediaQuery.of(context).size.height * 0.75, - child: Video( - controller: _controller, - fit: BoxFit.cover, - alignment: Alignment.topCenter, - ), - ), - const SizedBox(height: 10), - Text( - 'f0cked by: ${widget.details.username}', - style: const TextStyle( - fontSize: 16, - color: Color.fromARGB(255, 255, 255, 255), - ), - ), - ], - ), - ); - } -} diff --git a/pubspec.yaml b/pubspec.yaml index 493d270..e2f5583 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.0.0+1 +version: 1.0.1+1 environment: sdk: ^3.9.0-172.0.dev