posibles fiexes
This commit is contained in:
@@ -682,6 +682,7 @@ class _GestorVideosPageState extends State<GestorVideosPage> {
|
||||
];
|
||||
|
||||
return PlutoGrid(
|
||||
key: ValueKey('pluto_grid_${provider.gridRebuildKey}'),
|
||||
columns: columns,
|
||||
rows: provider.videosRows,
|
||||
onLoaded: (PlutoGridOnLoadedEvent event) {
|
||||
@@ -690,6 +691,8 @@ class _GestorVideosPageState extends State<GestorVideosPage> {
|
||||
// Configurar paginación dinámica según resolución
|
||||
final pageSize = _calculatePageSize(context);
|
||||
_stateManager!.setPageSize(pageSize, notify: true);
|
||||
// Conectar stateManager al provider para actualizaciones directas
|
||||
provider.stateManager = _stateManager;
|
||||
},
|
||||
createFooter: (stateManager) {
|
||||
return PlutoPagination(stateManager);
|
||||
|
||||
@@ -109,72 +109,6 @@ class _PremiumDashboardPageState extends State<PremiumDashboardPage>
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildWelcomeHeader() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(32),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFF4EC9F5),
|
||||
const Color(0xFFFFB733),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppTheme.of(context).primaryColor.withOpacity(0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.dashboard,
|
||||
size: 40,
|
||||
color: Color(0xFF0B0B0D),
|
||||
),
|
||||
),
|
||||
const Gap(20),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'¡Bienvenido al Dashboard!',
|
||||
style: AppTheme.of(context).title1.override(
|
||||
fontFamily: 'Poppins',
|
||||
color: const Color(0xFF0B0B0D),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 28,
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Text(
|
||||
'Visualiza el rendimiento de tu contenido en tiempo real',
|
||||
style: AppTheme.of(context).bodyText1.override(
|
||||
fontFamily: 'Poppins',
|
||||
color: const Color(0xFF0B0B0D).withOpacity(0.8),
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatsCards(bool isMobile) {
|
||||
if (isLoading) {
|
||||
return _buildLoadingSkeleton(isMobile);
|
||||
@@ -718,68 +652,6 @@ class _PremiumDashboardPageState extends State<PremiumDashboardPage>
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildChartSkeleton(String title) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(28),
|
||||
decoration: BoxDecoration(
|
||||
color: AppTheme.of(context).secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(
|
||||
color: AppTheme.of(context).primaryColor.withOpacity(0.1),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: AppTheme.of(context).title3.override(
|
||||
fontFamily: 'Poppins',
|
||||
color: AppTheme.of(context).primaryText,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const Gap(24),
|
||||
Shimmer.fromColors(
|
||||
baseColor: AppTheme.of(context).tertiaryBackground,
|
||||
highlightColor: AppTheme.of(context).secondaryBackground,
|
||||
child: Container(
|
||||
height: 300,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildEmptyChart(String message) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.pie_chart_outline,
|
||||
size: 64,
|
||||
color: AppTheme.of(context).tertiaryText,
|
||||
),
|
||||
const Gap(16),
|
||||
Text(
|
||||
message,
|
||||
style: AppTheme.of(context).bodyText1.override(
|
||||
fontFamily: 'Poppins',
|
||||
color: AppTheme.of(context).tertiaryText,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _formatNumber(int number) {
|
||||
if (number >= 1000000) {
|
||||
return '${(number / 1000000).toStringAsFixed(1)}M';
|
||||
|
||||
@@ -2,8 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:energy_media/providers/visual_state_provider.dart';
|
||||
import 'package:energy_media/providers/user_provider.dart';
|
||||
import 'package:energy_media/pages/videos/premium_dashboard_page.dart';
|
||||
import 'package:energy_media/pages/videos/gestor_videos_page.dart';
|
||||
import 'package:energy_media/theme/theme.dart';
|
||||
import 'package:energy_media/helpers/globals.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
@@ -67,8 +65,6 @@ class _VideosLayoutState extends State<VideosLayout> {
|
||||
}
|
||||
|
||||
Widget _buildHeader(bool isMobile) {
|
||||
final isDark = AppTheme.themeMode == ThemeMode.dark;
|
||||
final isLightBackground = !isDark;
|
||||
final currentLocation = GoRouterState.of(context).matchedLocation;
|
||||
final currentMenuItem = _menuItems.firstWhere(
|
||||
(item) => item.route == currentLocation,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:energy_media/theme/theme.dart';
|
||||
import 'package:energy_media/providers/videos_provider.dart';
|
||||
|
||||
class EmptyStateWidget extends StatelessWidget {
|
||||
final VoidCallback onUploadPressed;
|
||||
|
||||
@@ -250,16 +250,16 @@ class _PremiumUploadDialogState extends State<PremiumUploadDialog> {
|
||||
Widget _buildHeader() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFF4EC9F5),
|
||||
const Color(0xFFFFB733),
|
||||
Color(0xFF4EC9F5),
|
||||
Color(0xFFFFB733),
|
||||
],
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(24),
|
||||
topRight: Radius.circular(24),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user