mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-22 22:58:14 +02:00
feat: add mobile Xtream service, data providers, and UI widgets for Live TV and Movies.
This commit is contained in:
1 parent
527582e21b
commit
a1b1363bc8
9 files changed
+875
-774
No files matched your search
@@ -0,0 +1,76 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:xtremobile/core/theme/app_decorations.dart';
|
||||
import 'package:xtremobile/mobile/widgets/tv_focusable.dart';
|
||||
|
||||
class MobileCategoryCard extends StatelessWidget {
|
||||
final String title;
|
||||
final VoidCallback onTap;
|
||||
final IconData icon;
|
||||
final Color iconColor;
|
||||
|
||||
const MobileCategoryCard({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.onTap,
|
||||
this.icon = Icons.folder_rounded,
|
||||
this.iconColor = const Color(0xFF0A84FF),
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TVFocusable(
|
||||
onPressed: onTap,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Stack(
|
||||
children: [
|
||||
// Base glossy background
|
||||
Container(
|
||||
decoration: AppDecorations.glossyCard(context, radius: 16),
|
||||
),
|
||||
// Glossy highlight overlay (shimmer)
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: 60,
|
||||
child: IgnorePointer(
|
||||
child: Container(
|
||||
decoration: AppDecorations.glossShimmer(context, radius: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Content
|
||||
Positioned.fill(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
color: iconColor,
|
||||
size: 28,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: AppDecorations.textPrimary(context),
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0.1,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,6 @@ class MobilePosterCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@@ -34,18 +33,7 @@ class MobilePosterCard extends StatelessWidget {
|
||||
// Shadow lives on this outer Container so ClipRRect doesn't swallow it
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: isDark
|
||||
? const Color(0x99000000)
|
||||
: const Color(0x28000000),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 6),
|
||||
),
|
||||
],
|
||||
),
|
||||
decoration: AppDecorations.glossyCard(context, radius: 12),
|
||||
child: TVFocusable(
|
||||
onPressed: onTap,
|
||||
onLongPress: onLongPress,
|
||||
@@ -144,6 +132,19 @@ class MobilePosterCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Glossy highlight overlay (top shimmer)
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: 80, // Taller for posters
|
||||
child: IgnorePointer(
|
||||
child: Container(
|
||||
decoration: AppDecorations.glossShimmer(context, radius: 12),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user