mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
fix: Improved and fixed some of the videoPlayer controls (#241)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
effa97e0d8
commit
178af97294
5 changed files with 75 additions and 14 deletions
48
lib/screens/shared/media/components/item_logo.dart
Normal file
48
lib/screens/shared/media/components/item_logo.dart
Normal 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue