fixed app theme issues
This commit is contained in:
parent
a2eac2a1d5
commit
ed22b5fd6c
|
|
@ -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}"
|
||||||
|
|
||||||
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue