From 804b068714ef0b116d9b9703a054bca3dd21d26c Mon Sep 17 00:00:00 2001 From: Devasy Patel <110348311+Devasy23@users.noreply.github.com> Date: Fri, 17 Apr 2026 00:13:03 +0530 Subject: [PATCH] fix: update Flutter SDK version to 3.41.6 in pubspec.yaml --- .../lib/screens/profile_screen.dart | 110 ++++++++++-------- workout-logger/pubspec.yaml | 2 +- 2 files changed, 61 insertions(+), 51 deletions(-) diff --git a/workout-logger/lib/screens/profile_screen.dart b/workout-logger/lib/screens/profile_screen.dart index 5bc1aa0..ee28815 100644 --- a/workout-logger/lib/screens/profile_screen.dart +++ b/workout-logger/lib/screens/profile_screen.dart @@ -43,8 +43,9 @@ class _ProfileScreenState extends State { final file = File('${tempDir.path}/repforge_backup_$dateStr.json'); await file.writeAsString(jsonString); - final result = await Share.shareXFiles([XFile(file.path)], - subject: 'RepForge Backup'); + final result = await Share.shareXFiles([ + XFile(file.path), + ], subject: 'RepForge Backup'); if (!mounted) return; if (result.status == ShareResultStatus.success || @@ -52,7 +53,8 @@ class _ProfileScreenState extends State { _showSnack('Backup exported successfully!', AppTheme.success); } } catch (e) { - if (mounted) _showSnack('Export failed. Please try again.', AppTheme.error); + if (mounted) + _showSnack('Export failed. Please try again.', AppTheme.error); } finally { if (mounted) setState(() => _isExporting = false); } @@ -64,8 +66,10 @@ class _ProfileScreenState extends State { builder: (ctx) => AlertDialog( backgroundColor: AppTheme.cardColor, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), - title: const Text('Import Backup', - style: TextStyle(color: AppTheme.textPrimary)), + title: const Text( + 'Import Backup', + style: TextStyle(color: AppTheme.textPrimary), + ), content: const Text( 'This will merge the backup with your existing data. ' 'Select a .json RepForge backup file to continue.', @@ -74,13 +78,17 @@ class _ProfileScreenState extends State { actions: [ TextButton( onPressed: () => Navigator.pop(ctx, false), - child: - const Text('Cancel', style: TextStyle(color: AppTheme.textSecondary)), + child: const Text( + 'Cancel', + style: TextStyle(color: AppTheme.textSecondary), + ), ), ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: AppTheme.primaryColor, - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), ), onPressed: () => Navigator.pop(ctx, true), child: const Text('Choose File'), @@ -92,8 +100,10 @@ class _ProfileScreenState extends State { setState(() => _isImporting = true); try { - final result = await FilePicker.platform - .pickFiles(type: FileType.custom, allowedExtensions: ['json']); + final result = await FilePicker.platform.pickFiles( + type: FileType.custom, + allowedExtensions: ['json'], + ); if (result == null || result.files.single.path == null) { if (mounted) setState(() => _isImporting = false); return; @@ -114,10 +124,12 @@ class _ProfileScreenState extends State { final sessionCount = (data['sessions'] as List?)?.length ?? 0; final routineCount = (data['routines'] as List?)?.length ?? 0; _showSnack( - 'Import complete! $sessionCount sessions, $routineCount routines.', - AppTheme.success); + 'Import complete! $sessionCount sessions, $routineCount routines.', + AppTheme.success, + ); } catch (e) { - if (mounted) _showSnack('Import failed. Invalid backup file.', AppTheme.error); + if (mounted) + _showSnack('Import failed. Invalid backup file.', AppTheme.error); } finally { if (mounted) setState(() => _isImporting = false); } @@ -136,7 +148,9 @@ class _ProfileScreenState extends State { if (!mounted) return; _showSnack( - success ? 'Cloud backup successful!' : 'Backup failed. Please try again.', + success + ? 'Cloud backup successful!' + : 'Backup failed. Please try again.', success ? AppTheme.success : AppTheme.error, ); } catch (_) { @@ -147,9 +161,9 @@ class _ProfileScreenState extends State { } void _showSnack(String message, Color color) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(message), backgroundColor: color), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text(message), backgroundColor: color)); } // ==================== Build ==================== @@ -199,7 +213,10 @@ class _ProfileScreenState extends State { ), child: SafeArea( child: Padding( - padding: const EdgeInsets.all(AppSpacing.lg), + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.lg, + vertical: AppSpacing.md, + ), child: Column( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, @@ -295,17 +312,16 @@ class _ProfileScreenState extends State { selectedColor: AppTheme.primaryColor.withOpacity(0.25), backgroundColor: AppTheme.surfaceColor, labelStyle: TextStyle( - color: - selected ? AppTheme.primaryColor : AppTheme.textSecondary, - fontWeight: - selected ? FontWeight.bold : FontWeight.normal, + color: selected + ? AppTheme.primaryColor + : AppTheme.textSecondary, + fontWeight: selected ? FontWeight.bold : FontWeight.normal, fontSize: 13, ), side: BorderSide( color: selected ? AppTheme.primaryColor : Colors.transparent, ), - padding: - const EdgeInsets.symmetric(horizontal: 4, vertical: 2), + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), ); }).toList(), ), @@ -374,9 +390,14 @@ class _ProfileScreenState extends State { decoration: InputDecoration( hintText: 'mongodb+srv://user:pass@cluster.mongodb.net/db', hintStyle: const TextStyle( - color: AppTheme.textMuted, fontSize: 13), - prefixIcon: const Icon(Icons.link_rounded, - color: AppTheme.textMuted, size: 20), + color: AppTheme.textMuted, + fontSize: 13, + ), + prefixIcon: const Icon( + Icons.link_rounded, + color: AppTheme.textMuted, + size: 20, + ), filled: true, fillColor: AppTheme.surfaceColor.withOpacity(0.5), border: OutlineInputBorder( @@ -384,7 +405,9 @@ class _ProfileScreenState extends State { borderSide: BorderSide.none, ), contentPadding: const EdgeInsets.symmetric( - horizontal: 12, vertical: 12), + horizontal: 12, + vertical: 12, + ), ), ), const SizedBox(height: AppSpacing.sm), @@ -568,10 +591,8 @@ class _UnitToggleButton extends StatelessWidget { child: Text( label, style: TextStyle( - color: - selected ? AppTheme.primaryColor : AppTheme.textSecondary, - fontWeight: - selected ? FontWeight.bold : FontWeight.normal, + color: selected ? AppTheme.primaryColor : AppTheme.textSecondary, + fontWeight: selected ? FontWeight.bold : FontWeight.normal, fontSize: 15, ), ), @@ -624,14 +645,12 @@ class _ActionTile extends StatelessWidget { height: 20, child: CircularProgressIndicator( strokeWidth: 2, - valueColor: - AlwaysStoppedAnimation(AppTheme.primaryColor), + valueColor: AlwaysStoppedAnimation( + AppTheme.primaryColor, + ), ), ) - : const Icon( - Icons.chevron_right, - color: AppTheme.textMuted, - ), + : const Icon(Icons.chevron_right, color: AppTheme.textMuted), onTap: onTap, ); } @@ -658,10 +677,7 @@ class _InfoTile extends StatelessWidget { const SizedBox(width: 12), Text( label, - style: const TextStyle( - color: AppTheme.textSecondary, - fontSize: 13, - ), + style: const TextStyle(color: AppTheme.textSecondary, fontSize: 13), ), const Spacer(), Text( @@ -683,11 +699,7 @@ class _Divider extends StatelessWidget { @override Widget build(BuildContext context) { - return const Divider( - color: AppTheme.surfaceColor, - height: 1, - indent: 40, - ); + return const Divider(color: AppTheme.surfaceColor, height: 1, indent: 40); } } @@ -699,9 +711,7 @@ class _ComingSoonBadge extends StatelessWidget { decoration: BoxDecoration( color: AppTheme.warning.withOpacity(0.15), borderRadius: BorderRadius.circular(AppRadius.full), - border: Border.all( - color: AppTheme.warning.withOpacity(0.4), - ), + border: Border.all(color: AppTheme.warning.withOpacity(0.4)), ), child: const Text( 'Coming Soon', diff --git a/workout-logger/pubspec.yaml b/workout-logger/pubspec.yaml index ed2cfe3..5fb4b73 100644 --- a/workout-logger/pubspec.yaml +++ b/workout-logger/pubspec.yaml @@ -20,7 +20,7 @@ version: 1.0.14+15 environment: sdk: ^3.9.2 - flutter: 3.41.5 + flutter: 3.41.6 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions