fix: Improved and fixed some of the videoPlayer controls (#241)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-02-28 09:58:10 +01:00 committed by GitHub
parent effa97e0d8
commit 178af97294
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 75 additions and 14 deletions

View file

@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
import 'package:fladder/models/item_base_model.dart';
import 'package:fladder/util/fladder_image.dart';
class ItemLogo extends StatelessWidget {
final ItemBaseModel item;
final Alignment imageAlignment;
final TextStyle? textStyle;
const ItemLogo({
required this.item,
this.imageAlignment = Alignment.bottomCenter,
this.textStyle,
super.key,
});
@override
Widget build(BuildContext context) {
final logo = item.getPosters?.logo;
final textWidget = Container(
height: 512,
alignment: imageAlignment,
child: Text(
item.parentBaseModel.name,
textAlign: TextAlign.start,
maxLines: 3,
overflow: TextOverflow.fade,
style: textStyle ??
Theme.of(context).textTheme.headlineLarge?.copyWith(
fontSize: 55,
),
),
);
return logo != null
? ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 500, maxHeight: 500),
child: FladderImage(
image: logo,
disableBlur: true,
alignment: imageAlignment,
imageErrorBuilder: (context, object, stack) => textWidget,
placeHolder: const SizedBox(height: 0),
fit: BoxFit.contain,
),
)
: textWidget;
}
}

View file

@ -24,7 +24,7 @@ class MediaHeader extends ConsumerWidget {
alignment: Alignment.center,
child: SelectableText(
name,
textAlign: TextAlign.center,
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
fontSize: 55,
),
@ -47,7 +47,7 @@ class MediaHeader extends ConsumerWidget {
logo != null
? FladderImage(
image: logo,
enableBlur: true,
disableBlur: true,
alignment: Alignment.bottomCenter,
imageErrorBuilder: (context, object, stack) => textWidget,
placeHolder: const SizedBox(height: 0),