fixed app theme issues

This commit is contained in:
Deep Koluguri 2025-11-05 10:58:24 -05:00
parent a2eac2a1d5
commit ed22b5fd6c
2 changed files with 40 additions and 4 deletions

36
fix-and-deploy.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash
###############################################################################
# Fix Theme Issues and Deploy Frontend
###############################################################################
SERVER_IP="192.168.8.148"
cd /home/luckychit/apps/chitfund/luckychit
echo "🔧 Fixing theme issues..."
# Fix CardTheme to CardThemeData
sed -i 's/cardTheme: CardTheme(/cardTheme: CardThemeData(/g' lib/core/themes/app_theme.dart
# Fix DialogTheme to DialogThemeData
sed -i 's/dialogTheme: DialogTheme(/dialogTheme: DialogThemeData(/g' lib/core/themes/app_theme.dart
echo "✅ Theme fixes applied"
echo "🔧 Updating API URL..."
sed -i "s|http://localhost:3000/api|http://${SERVER_IP}:3000/api|g" lib/core/services/api_service.dart
echo "📦 Getting dependencies..."
flutter pub get
echo "🏗️ Building web app..."
flutter build web --release
echo "🚀 Deploying..."
mkdir -p /var/www/luckychit
cp -r build/web/* /var/www/luckychit/
chown -R www-data:www-data /var/www/luckychit
echo "🔄 Restoring original files..."
git checkout lib/core/services/api_service.dart 2>/dev/null || sed -i "s|http://${SERVER_IP}:3000/api|http://localhost:3000/api|g" lib/core/services/api_service.dart
echo "✅ Done! Visit: http://${SERVER_IP}"

View File

@ -60,7 +60,7 @@ class AppTheme {
), ),
// Card Theme // Card Theme
cardTheme: CardTheme( cardTheme: CardThemeData(
elevation: 2, elevation: 2,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.r), borderRadius: BorderRadius.circular(16.r),
@ -183,7 +183,7 @@ class AppTheme {
), ),
// Dialog Theme // Dialog Theme
dialogTheme: DialogTheme( dialogTheme: DialogThemeData(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.r), borderRadius: BorderRadius.circular(16.r),
), ),
@ -241,7 +241,7 @@ class AppTheme {
), ),
// Card Theme // Card Theme
cardTheme: CardTheme( cardTheme: CardThemeData(
elevation: 4, elevation: 4,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.r), borderRadius: BorderRadius.circular(16.r),
@ -364,7 +364,7 @@ class AppTheme {
), ),
// Dialog Theme // Dialog Theme
dialogTheme: DialogTheme( dialogTheme: DialogThemeData(
backgroundColor: darkSurface, backgroundColor: darkSurface,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.r), borderRadius: BorderRadius.circular(16.r),