posibles fiexes

This commit is contained in:
Abraham
2026-01-15 20:56:31 -08:00
parent 405c40d0b5
commit ec5c62a64b
8 changed files with 15 additions and 143 deletions

View File

@@ -425,10 +425,10 @@ class _LoginPageState extends State<LoginPage> with TickerProviderStateMixin {
animation: _fadeController,
builder: (context, child) {
return Positioned(
top: circle['top'] as double?,
bottom: circle['bottom'] as double?,
left: circle['left'] as double?,
right: circle['right'] as double?,
top: circle['top'],
bottom: circle['bottom'],
left: circle['left'],
right: circle['right'],
child: Transform.scale(
scale: 0.5 + (_fadeAnimation.value * 0.5),
child: Container(

View File

@@ -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);

View File

@@ -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';

View File

@@ -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,

View File

@@ -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;

View File

@@ -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),
),

View File

@@ -14,6 +14,7 @@ class VideosProvider extends ChangeNotifier {
// ========== STATE MANAGEMENT ==========
PlutoGridStateManager? stateManager;
List<PlutoRow> videosRows = [];
int gridRebuildKey = 0; // Key for forcing PlutoGrid rebuild
// ========== DATA LISTS ==========
List<MediaFileModel> mediaFiles = [];
@@ -755,6 +756,7 @@ class VideosProvider extends ChangeNotifier {
void searchVideos(String query) {
if (query.isEmpty) {
_buildPlutoRows();
gridRebuildKey++;
notifyListeners();
return;
}
@@ -789,6 +791,7 @@ class VideosProvider extends ChangeNotifier {
);
}
gridRebuildKey++;
notifyListeners();
}

View File

@@ -103,4 +103,4 @@ flutter:
fonts:
- asset: assets/fonts/Poppins-Regular.ttf
- asset: assets/fonts/Poppins-Bold.ttf
weight: 700
weight: 700