diff --git a/flutter_01.png b/flutter_01.png deleted file mode 100644 index dd4630f..0000000 Binary files a/flutter_01.png and /dev/null differ diff --git a/flutter_02.png b/flutter_02.png deleted file mode 100644 index 6455f1d..0000000 Binary files a/flutter_02.png and /dev/null differ diff --git a/flutter_03.png b/flutter_03.png deleted file mode 100644 index 41c6096..0000000 Binary files a/flutter_03.png and /dev/null differ diff --git a/flutter_04.png b/flutter_04.png deleted file mode 100644 index 5922d6c..0000000 Binary files a/flutter_04.png and /dev/null differ diff --git a/flutter_05.png b/flutter_05.png deleted file mode 100644 index 39027ac..0000000 Binary files a/flutter_05.png and /dev/null differ diff --git a/flutter_06.png b/flutter_06.png deleted file mode 100644 index f3406b8..0000000 Binary files a/flutter_06.png and /dev/null differ diff --git a/flutter_07.png b/flutter_07.png deleted file mode 100644 index f3406b8..0000000 Binary files a/flutter_07.png and /dev/null differ diff --git a/lib/main.dart b/lib/main.dart index c5e37e9..ad4ad55 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'widgets/header_widget.dart'; import 'widgets/hero_section_widget.dart'; import 'widgets/search_bar_widget.dart'; import 'widgets/popular_places_widget.dart'; +import 'widgets/recommendation_widget.dart'; import 'theme/app_theme.dart'; void main() { @@ -30,19 +31,26 @@ class TravelHomePage extends StatelessWidget { return Scaffold( backgroundColor: AppTheme.backgroundColor, body: SafeArea( - child: Column( - children: [ - SizedBox( - height: MediaQuery.of(context).size.height * 0.5, - child: const HeroSectionWidget(), - ), - - const SizedBox(height: 20), - - const PopularPlacesWidget(), - - const SizedBox(height: 20), - ], + child: SingleChildScrollView( + child: Column( + children: [ + SizedBox( + height: MediaQuery.of(context).size.height * 0.5, + child: const HeroSectionWidget(), + ), + + const SizedBox(height: 20), + + const PopularPlacesWidget(), + + const SizedBox(height: 20), + + // Section Recommendation + const RecommendationWidget(), + + const SizedBox(height: 20), + ], + ), ), ), ); diff --git a/lib/widgets/recommendation_widget.dart b/lib/widgets/recommendation_widget.dart new file mode 100644 index 0000000..40102b7 --- /dev/null +++ b/lib/widgets/recommendation_widget.dart @@ -0,0 +1,166 @@ +import 'package:flutter/material.dart'; +import '../theme/app_theme.dart'; + +class RecommendationWidget extends StatelessWidget { + const RecommendationWidget({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Header avec titre et "View all" + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Recommendation', + style: Theme.of(context).textTheme.titleLarge?.copyWith( + fontWeight: FontWeight.bold, + ), + ), + Text( + 'View all', + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: AppTheme.textSecondary, + ), + ), + ], + ), + ), + + const SizedBox(height: 16), + + // Carte de recommandation unique + Container( + margin: const EdgeInsets.symmetric(horizontal: 8), + height: 200, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + blurRadius: 10, + offset: const Offset(0, 5), + ), + ], + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(20), + child: Stack( + children: [ + // Image de fond + Positioned.fill( + child: Image.asset( + 'assets/images/fond1.webp', + fit: BoxFit.cover, + errorBuilder: (context, error, stackTrace) { + // Fallback avec gradient si l'image ne charge pas + return Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFF1E3A8A), + Color(0xFF7C2D12), + Color(0xFFDC2626), + Color(0xFFF59E0B), + ], + ), + ), + ); + }, + ), + ), + + // Overlay sombre pour le texte + Positioned.fill( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Colors.transparent, + Colors.black.withOpacity(0.6), + ], + ), + ), + ), + ), + + // Contenu textuel + Positioned( + bottom: 20, + left: 20, + right: 20, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Destination Recommandée', + style: Theme.of(context).textTheme.titleLarge?.copyWith( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 8), + Row( + children: [ + const Icon( + Icons.location_on, + color: Colors.white, + size: 16, + ), + const SizedBox(width: 4), + Text( + 'Lieu Secret, Monde', + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: Colors.white.withOpacity(0.9), + ), + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + const Icon( + Icons.star, + color: AppTheme.accentColor, + size: 18, + ), + const SizedBox(width: 4), + const Text( + '4.8/5', + style: TextStyle( + color: Colors.white, + fontSize: 16, + fontWeight: FontWeight.w600, + ), + ), + const SizedBox(width: 8), + Text( + '(120+ Review)', + style: TextStyle( + color: Colors.white.withOpacity(0.8), + fontSize: 14, + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + ), + ], + ); + } +}