Compare commits

..

10 Commits

12 changed files with 424 additions and 153 deletions

View File

@ -29,9 +29,10 @@ protected static function boot()
*/ */
public static function syncKontrakanStatus($kontrakanId) public static function syncKontrakanStatus($kontrakanId)
{ {
// Cek apakah ada booking checked_in // Cek apakah ada booking checked_in (sewa)
$hasCheckedIn = static::where('kontrakan_id', $kontrakanId) $hasCheckedIn = static::where('kontrakan_id', $kontrakanId)
->where('status', self::STATUS_CHECKED_IN) ->where('status', self::STATUS_CHECKED_IN)
->where('jenis_pengajuan', 'sewa')
->exists(); ->exists();
if ($hasCheckedIn) { if ($hasCheckedIn) {
@ -39,9 +40,10 @@ public static function syncKontrakanStatus($kontrakanId)
return; return;
} }
// Cek apakah ada booking confirmed atau pending // Cek apakah ada booking confirmed atau pending (sewa)
$hasActiveOrPending = static::where('kontrakan_id', $kontrakanId) $hasActiveOrPending = static::where('kontrakan_id', $kontrakanId)
->whereIn('status', [self::STATUS_CONFIRMED, self::STATUS_PENDING]) ->whereIn('status', [self::STATUS_CONFIRMED, self::STATUS_PENDING])
->where('jenis_pengajuan', 'sewa')
->exists(); ->exists();
if ($hasActiveOrPending) { if ($hasActiveOrPending) {

View File

@ -178,7 +178,7 @@
</div> </div>
@if($booking->jam_survei) @if($booking->jam_survei)
<small class="text-muted"> <small class="text-muted">
<i class="bi bi-clock me-1"></i>Pukul {{ $booking->jam_survei }} WIB <i class="bi bi-clock me-1"></i>Pukul {{ date('H.i', strtotime($booking->jam_survei)) }} WIB
</small> </small>
@endif @endif
<br> <br>

View File

@ -199,7 +199,7 @@ class="rounded me-3" style="width: 120px; height: 90px; object-fit: cover;">
</div> </div>
@if($booking->jam_survei) @if($booking->jam_survei)
<div class="fw-semibold mt-1"> <div class="fw-semibold mt-1">
<i class="bi bi-clock me-1 text-success"></i>Pukul {{ $booking->jam_survei }} WIB <i class="bi bi-clock me-1 text-success"></i>Pukul {{ date('H.i', strtotime($booking->jam_survei)) }} WIB
</div> </div>
@endif @endif
<span class="badge bg-success mt-1">Survei</span> <span class="badge bg-success mt-1">Survei</span>

View File

@ -4,6 +4,8 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<application <application
android:label="Kontrak Kampus" android:label="Kontrak Kampus"

View File

@ -264,7 +264,6 @@ class _SplashScreenState extends State<SplashScreen>
late AnimationController _animController; late AnimationController _animController;
late Animation<double> _fadeAnim; late Animation<double> _fadeAnim;
late Animation<double> _scaleAnim; late Animation<double> _scaleAnim;
String _statusText = 'Memulai aplikasi...';
@override @override
void initState() { void initState() {
@ -291,12 +290,9 @@ class _SplashScreenState extends State<SplashScreen>
} }
Future<void> _checkAuth() async { Future<void> _checkAuth() async {
// 🔍 Auto-detect server IP dengan fallback ke konfigurasi default. // Auto-detect server IP (status callback ditelan, user hanya lihat "Sedang memuat...")
// Ini membantu APK tetap bisa konek saat IP LAN berubah.
await ServerDiscoveryService.discover( await ServerDiscoveryService.discover(
onStatus: (status) { onStatus: (_) {}, // Tidak tampilkan info teknis ke user
if (mounted) setState(() => _statusText = status);
},
).timeout( ).timeout(
const Duration(seconds: 8), const Duration(seconds: 8),
onTimeout: () { onTimeout: () {
@ -305,7 +301,6 @@ class _SplashScreenState extends State<SplashScreen>
}, },
); );
if (mounted) setState(() => _statusText = 'Memeriksa sesi...');
await _authService.loadToken(); await _authService.loadToken();
await Future.delayed(const Duration(milliseconds: 400)); await Future.delayed(const Duration(milliseconds: 400));
@ -319,13 +314,7 @@ class _SplashScreenState extends State<SplashScreen>
Navigator.pushReplacement( Navigator.pushReplacement(
context, context,
PageRouteBuilder( MaterialPageRoute(builder: (_) => destination),
pageBuilder: (_, __, ___) => destination,
transitionsBuilder: (_, animation, __, child) {
return FadeTransition(opacity: animation, child: child);
},
transitionDuration: const Duration(milliseconds: 500),
),
); );
} }
@ -335,82 +324,122 @@ class _SplashScreenState extends State<SplashScreen>
body: Container( body: Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topLeft, begin: Alignment.topCenter,
end: Alignment.bottomRight, end: Alignment.bottomCenter,
colors: [Color(0xFF1565C0), Color(0xFF0D47A1), Color(0xFF1A237E)], colors: [Color(0xFF1565C0), Color(0xFF1E88E5)],
), ),
), ),
child: Center( child: Stack(
child: FadeTransition( children: [
opacity: _fadeAnim, // ==================== KONTEN UTAMA (TENGAH) ====================
child: ScaleTransition( Center(
scale: _scaleAnim, child: FadeTransition(
child: Column( opacity: _fadeAnim,
mainAxisAlignment: MainAxisAlignment.center, child: ScaleTransition(
children: [ scale: _scaleAnim,
Container( child: Column(
padding: const EdgeInsets.all(28), mainAxisAlignment: MainAxisAlignment.center,
decoration: BoxDecoration( children: [
color: Colors.white, // Logo toga di dalam CircleAvatar putih
shape: BoxShape.circle, Container(
boxShadow: [ decoration: BoxDecoration(
BoxShadow( shape: BoxShape.circle,
color: Colors.black.withOpacity(0.15), boxShadow: [
blurRadius: 30, BoxShadow(
offset: const Offset(0, 10), color: Colors.black.withValues(alpha: 0.15),
blurRadius: 30,
offset: const Offset(0, 10),
),
],
),
child: const CircleAvatar(
radius: 50,
backgroundColor: Colors.white,
child: Icon(
Icons.school,
size: 56,
color: Color(0xFF1565C0),
),
), ),
],
),
child: const Icon(
Icons.school_rounded,
size: 64,
color: Color(0xFF1565C0),
),
),
const SizedBox(height: 32),
const Text(
'Kontrak Kampus',
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.w800,
color: Colors.white,
letterSpacing: 0.5,
),
),
const SizedBox(height: 8),
Text(
'Rekomendasi Kontrakan & Laundry untuk Mahasiswa',
style: TextStyle(
fontSize: 14,
color: Colors.white.withOpacity(0.8),
letterSpacing: 0.3,
),
),
const SizedBox(height: 48),
SizedBox(
width: 32,
height: 32,
child: CircularProgressIndicator(
strokeWidth: 2.5,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white.withOpacity(0.9),
), ),
),
const SizedBox(height: 32),
// Nama aplikasi — bold, non-italic, 28sp, putih
const Text(
'Kontrak Kampus',
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal,
color: Colors.white,
letterSpacing: 0.5,
),
),
const SizedBox(height: 8),
// Tagline — kecil, putih transparan
Text(
'Rekomendasi Kontrakan & Laundry untuk Mahasiswa',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14,
color: Colors.white.withValues(alpha: 0.8),
letterSpacing: 0.3,
),
),
const SizedBox(height: 48),
// Teks loading ramah user
Text(
'Sedang memuat...',
style: TextStyle(
fontSize: 13,
color: Colors.white.withValues(alpha: 0.7),
),
),
const SizedBox(height: 16),
// Loading indicator di bawah teks loading
SizedBox(
width: 32,
height: 32,
child: CircularProgressIndicator(
strokeWidth: 2.5,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white.withValues(alpha: 0.9),
),
),
),
],
), ),
const SizedBox(height: 16), ),
Text(
_statusText,
style: TextStyle(
fontSize: 13,
color: Colors.white.withOpacity(0.7),
),
),
],
), ),
), ),
),
// ==================== VERSI APP (BAWAH TENGAH) ====================
Positioned(
bottom: 32,
left: 0,
right: 0,
child: Center(
child: Text(
'v1.0.0',
style: TextStyle(
fontSize: 12,
color: Colors.white.withValues(alpha: 0.5),
fontWeight: FontWeight.w400,
),
),
),
),
],
), ),
), ),
); );
} }
} }

View File

@ -291,7 +291,26 @@ class Laundry {
double get jarak => jarakKampus; // alias for jarak field double get jarak => jarakKampus; // alias for jarak field
double get rating => avgRating ?? 0.0; double get rating => avgRating ?? 0.0;
String get estimasiSelesai => '$waktuProses jam'; // Format jam secara umum menjadi format ramah pengguna (contoh: "3 hari", "10 jam")
static String formatJam(int jam) {
if (jam >= 24) {
final hari = jam ~/ 24;
final sisaJam = jam % 24;
if (sisaJam == 0) {
return '$hari hari';
} else {
return '$hari hari $sisaJam jam';
}
}
return '$jam jam';
}
// Format waktu proses sesuai jenis layanan
String formattedWaktuProsesFor(String? jenisLayanan) {
return formatJam(waktuProsesFor(jenisLayanan));
}
String get estimasiSelesai => formatJam(waktuProses);
// Check if currently open // Check if currently open
bool get isOpen { bool get isOpen {

View File

@ -677,7 +677,7 @@ class _FavoritesScreenState extends State<FavoritesScreen>
children: [ children: [
_buildInfoChip( _buildInfoChip(
Icons.schedule_rounded, Icons.schedule_rounded,
'${laundry.waktuProses}h proses', '${laundry.estimasiSelesai} proses',
const Color(0xFF00897B), const Color(0xFF00897B),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),

View File

@ -1378,7 +1378,7 @@ class _ImprovedHomeScreenState extends State<ImprovedHomeScreen> {
), ),
const SizedBox(width: 3), const SizedBox(width: 3),
Text( Text(
'${laundry.waktuProses}h', laundry.estimasiSelesai,
style: const TextStyle( style: const TextStyle(
fontSize: 11, fontSize: 11,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

View File

@ -295,7 +295,7 @@ class _LaundryDetailScreenState extends State<LaundryDetailScreen> {
), ),
_buildHeaderChip( _buildHeaderChip(
icon: Icons.schedule_rounded, icon: Icons.schedule_rounded,
label: '${widget.laundry.waktuProsesFor(widget.selectedJenisLayanan)} jam', label: widget.laundry.formattedWaktuProsesFor(widget.selectedJenisLayanan),
), ),
], ],
), ),
@ -347,7 +347,7 @@ class _LaundryDetailScreenState extends State<LaundryDetailScreen> {
_buildInfoRow( _buildInfoRow(
Icons.schedule, Icons.schedule,
'Kecepatan Layanan', 'Kecepatan Layanan',
'${widget.laundry.waktuProsesFor(widget.selectedJenisLayanan)} jam', widget.laundry.formattedWaktuProsesFor(widget.selectedJenisLayanan),
), ),
], ],
), ),
@ -366,15 +366,17 @@ class _LaundryDetailScreenState extends State<LaundryDetailScreen> {
widget.laundry.formattedHargaFor("harian"), widget.laundry.formattedHargaFor("harian"),
Icons.scale, Icons.scale,
const Color(0xFF00897B), const Color(0xFF00897B),
duration: widget.laundry.formattedWaktuProsesFor("harian"),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
], ],
if (widget.laundry.hargaJam > 0) if (widget.laundry.hargaJam > 0)
_buildPriceCard( _buildPriceCard(
'Laundry Express (Jam/Satuan)', 'Laundry Express (Jam)',
widget.laundry.formattedHargaFor("jam"), widget.laundry.formattedHargaFor("jam"),
Icons.flash_on, Icons.flash_on,
const Color(0xFFFF9800), const Color(0xFFFF9800),
duration: widget.laundry.formattedWaktuProsesFor("jam"),
), ),
if (widget.laundry.hargaHarian == 0 && widget.laundry.hargaJam == 0) if (widget.laundry.hargaHarian == 0 && widget.laundry.hargaJam == 0)
_buildPriceCard( _buildPriceCard(
@ -382,6 +384,7 @@ class _LaundryDetailScreenState extends State<LaundryDetailScreen> {
widget.laundry.formattedHargaKiloan, widget.laundry.formattedHargaKiloan,
Icons.scale, Icons.scale,
const Color(0xFF00897B), const Color(0xFF00897B),
duration: widget.laundry.formattedWaktuProsesFor("harian"),
), ),
], ],
), ),
@ -811,8 +814,9 @@ class _LaundryDetailScreenState extends State<LaundryDetailScreen> {
String title, String title,
String price, String price,
IconData icon, IconData icon,
Color color, Color color, {
) { String? duration,
}) {
return Container( return Container(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -839,6 +843,17 @@ class _LaundryDetailScreenState extends State<LaundryDetailScreen> {
title, title,
style: TextStyle(fontSize: 14, color: Colors.grey[700]), style: TextStyle(fontSize: 14, color: Colors.grey[700]),
), ),
if (duration != null && duration.isNotEmpty) ...[
const SizedBox(height: 2),
Text(
'Estimasi selesai: $duration',
style: TextStyle(
fontSize: 12,
color: Colors.grey[600],
fontWeight: FontWeight.w500,
),
),
],
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
price, price,

View File

@ -1,4 +1,6 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import '../services/auth_service.dart'; import '../services/auth_service.dart';
import '../services/favorite_service.dart'; import '../services/favorite_service.dart';
import '../services/booking_service.dart'; import '../services/booking_service.dart';
@ -25,6 +27,7 @@ class _ProfileScreenState extends State<ProfileScreen>
bool _isLoading = true; bool _isLoading = true;
int _totalFavorites = 0; int _totalFavorites = 0;
int _totalBookings = 0; int _totalBookings = 0;
File? _profileImage;
late AnimationController _animController; late AnimationController _animController;
late Animation<double> _fadeAnim; late Animation<double> _fadeAnim;
@ -111,6 +114,115 @@ class _ProfileScreenState extends State<ProfileScreen>
return '${months[date.month]} ${date.year}'; return '${months[date.month]} ${date.year}';
} }
Future<void> _pickProfileImage() async {
final source = await showModalBottomSheet<ImageSource>(
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
builder: (context) => SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 40,
height: 4,
decoration: BoxDecoration(
color: Colors.grey.shade300,
borderRadius: BorderRadius.circular(2),
),
),
const SizedBox(height: 16),
const Text(
'Pilih Sumber Foto',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w700,
color: Color(0xFF1A1A2E),
),
),
const SizedBox(height: 16),
ListTile(
leading: Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xFF1565C0).withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
),
child: const Icon(Icons.camera_alt_rounded,
color: Color(0xFF1565C0)),
),
title: const Text('Kamera',
style: TextStyle(fontWeight: FontWeight.w600)),
subtitle: const Text('Ambil foto baru'),
onTap: () => Navigator.pop(context, ImageSource.camera),
),
ListTile(
leading: Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xFF00897B).withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
),
child: const Icon(Icons.photo_library_rounded,
color: Color(0xFF00897B)),
),
title: const Text('Galeri',
style: TextStyle(fontWeight: FontWeight.w600)),
subtitle: const Text('Pilih dari galeri'),
onTap: () => Navigator.pop(context, ImageSource.gallery),
),
],
),
),
),
);
if (source == null) return;
try {
final picker = ImagePicker();
final pickedFile = await picker.pickImage(
source: source,
maxWidth: 512,
maxHeight: 512,
imageQuality: 85,
);
if (pickedFile != null && mounted) {
setState(() {
_profileImage = File(pickedFile.path);
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text('Foto profil berhasil diperbarui'),
backgroundColor: const Color(0xFF00897B),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: const EdgeInsets.all(16),
),
);
}
} catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Gagal memilih foto: $e'),
backgroundColor: Colors.red,
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: const EdgeInsets.all(16),
),
);
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -181,6 +293,26 @@ class _ProfileScreenState extends State<ProfileScreen>
); );
}, },
), ),
_buildMenuItem(
icon: Icons.notifications_outlined,
iconColor: const Color(0xFFFF8F00),
iconBg: const Color(0xFFFF8F00),
title: 'Pengaturan Notifikasi',
subtitle: 'Atur preferensi notifikasi',
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text('Fitur pengaturan notifikasi akan segera hadir'),
backgroundColor: const Color(0xFF1565C0),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: const EdgeInsets.all(16),
),
);
},
),
]), ]),
const SizedBox(height: 24), const SizedBox(height: 24),
@ -242,6 +374,46 @@ class _ProfileScreenState extends State<ProfileScreen>
subtitle: 'Informasi & versi aplikasi', subtitle: 'Informasi & versi aplikasi',
onTap: _showAboutDialog, onTap: _showAboutDialog,
), ),
_buildMenuItem(
icon: Icons.help_outline_rounded,
iconColor: const Color(0xFF0288D1),
iconBg: const Color(0xFF0288D1),
title: 'Bantuan & FAQ',
subtitle: 'Pertanyaan umum & panduan',
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text('Fitur bantuan & FAQ akan segera hadir'),
backgroundColor: const Color(0xFF1565C0),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: const EdgeInsets.all(16),
),
);
},
),
_buildMenuItem(
icon: Icons.privacy_tip_outlined,
iconColor: const Color(0xFF5E35B1),
iconBg: const Color(0xFF5E35B1),
title: 'Kebijakan Privasi',
subtitle: 'Syarat & ketentuan privasi',
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text('Fitur kebijakan privasi akan segera hadir'),
backgroundColor: const Color(0xFF1565C0),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: const EdgeInsets.all(16),
),
);
},
),
]), ]),
const SizedBox(height: 32), const SizedBox(height: 32),
@ -343,42 +515,78 @@ class _ProfileScreenState extends State<ProfileScreen>
// Avatar + Info // Avatar + Info
Row( Row(
children: [ children: [
// Avatar with shadow and gradient ring // Avatar with shadow, gradient ring, and camera button
Container( Stack(
decoration: BoxDecoration( children: [
shape: BoxShape.circle, Container(
boxShadow: [ decoration: BoxDecoration(
BoxShadow( shape: BoxShape.circle,
color: Colors.black.withValues(alpha: 0.2), boxShadow: [
blurRadius: 16, BoxShadow(
offset: const Offset(0, 6), color: Colors.black.withValues(alpha: 0.2),
blurRadius: 16,
offset: const Offset(0, 6),
),
],
), ),
], child: Container(
), padding: const EdgeInsets.all(3),
child: Container( decoration: const BoxDecoration(
padding: const EdgeInsets.all(3), shape: BoxShape.circle,
decoration: const BoxDecoration( gradient: LinearGradient(
shape: BoxShape.circle, colors: [Colors.white, Color(0xFFBBDEFB)],
gradient: LinearGradient( begin: Alignment.topLeft,
colors: [Colors.white, Color(0xFFBBDEFB)], end: Alignment.bottomRight,
begin: Alignment.topLeft, ),
end: Alignment.bottomRight, ),
), child: CircleAvatar(
), radius: 40,
child: CircleAvatar( backgroundColor: const Color(0xFF0D47A1),
radius: 40, backgroundImage: _profileImage != null
backgroundColor: const Color(0xFF0D47A1), ? FileImage(_profileImage!)
child: Text( : null,
_getInitials(_currentUser?.name ?? ''), child: _profileImage == null
style: const TextStyle( ? Text(
fontSize: 28, _getInitials(_currentUser?.name ?? ''),
fontWeight: FontWeight.w800, style: const TextStyle(
color: Colors.white, fontSize: 28,
letterSpacing: 1, fontWeight: FontWeight.w800,
color: Colors.white,
letterSpacing: 1,
),
)
: null,
), ),
), ),
), ),
), Positioned(
bottom: 0,
right: 0,
child: GestureDetector(
onTap: _pickProfileImage,
child: Container(
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: const Color(0xFF1565C0),
shape: BoxShape.circle,
border: Border.all(color: Colors.white, width: 2),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.2),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: const Icon(
Icons.camera_alt_rounded,
color: Colors.white,
size: 16,
),
),
),
),
],
), ),
const SizedBox(width: 18), const SizedBox(width: 18),
@ -697,33 +905,26 @@ class _ProfileScreenState extends State<ProfileScreen>
// ==================== LOGOUT ==================== // ==================== LOGOUT ====================
Widget _buildLogoutButton() { Widget _buildLogoutButton() {
return Container( return SizedBox(
width: double.infinity, width: double.infinity,
height: 54, height: 54,
decoration: BoxDecoration( child: ElevatedButton.icon(
borderRadius: BorderRadius.circular(16), onPressed: _handleLogout,
border: Border.all(color: Colors.red.shade200, width: 1.5), icon: const Icon(Icons.logout_rounded, size: 20),
), label: const Text(
child: Material( 'Keluar dari Akun',
color: Colors.red.shade50.withValues(alpha: 0.5), style: TextStyle(
borderRadius: BorderRadius.circular(16), fontSize: 15,
child: InkWell( fontWeight: FontWeight.w700,
onTap: _handleLogout, ),
borderRadius: BorderRadius.circular(16), ),
child: Row( style: ElevatedButton.styleFrom(
mainAxisAlignment: MainAxisAlignment.center, backgroundColor: Colors.red,
children: [ foregroundColor: Colors.white,
Icon(Icons.logout_rounded, color: Colors.red.shade600, size: 20), elevation: 2,
const SizedBox(width: 10), shadowColor: Colors.red.withValues(alpha: 0.3),
Text( shape: RoundedRectangleBorder(
'Keluar dari Akun', borderRadius: BorderRadius.circular(16),
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w700,
color: Colors.red.shade600,
),
),
],
), ),
), ),
), ),

View File

@ -1060,7 +1060,7 @@ class _SearchScreenState extends State<SearchScreen> {
), ),
const SizedBox(width: 4), const SizedBox(width: 4),
Text( Text(
'${laundry.waktuProses} jam', laundry.estimasiSelesai,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: Colors.grey[600], color: Colors.grey[600],

View File

@ -31,7 +31,10 @@ class LaundryCard extends StatelessWidget {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => LaundryDetailScreen(laundry: laundry), builder: (context) => LaundryDetailScreen(
laundry: laundry,
selectedJenisLayanan: selectedJenisLayanan,
),
), ),
); );
}, },
@ -236,7 +239,7 @@ class LaundryCard extends StatelessWidget {
), ),
const SizedBox(width: 4), const SizedBox(width: 4),
Text( Text(
'${laundry.waktuProsesFor(selectedJenisLayanan)}h', laundry.formattedWaktuProsesFor(selectedJenisLayanan),
style: const TextStyle( style: const TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,