import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; import 'event_details_viewmodel.dart'; class EventDetailsView extends StackedView { final int eventId; const EventDetailsView({Key? key, required this.eventId}) : super(key: key); @override Widget builder( BuildContext context, EventDetailsViewModel viewModel, Widget? child, ) { return Scaffold( backgroundColor: Theme.of(context).colorScheme.background, body: Column( children: [ Container( width: double.infinity, height: MediaQuery.of(context).size.width * 9 / 16, child: const Image( image: AssetImage('assets/images/Affiche.jpg'), fit: BoxFit.cover, alignment: Alignment.center, ), ), Container( color: Colors.white, padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ // Titre de l'événement Text( 'Disc\'Octonelle 2', style: TextStyle( fontSize: 24, fontWeight: FontWeight.bold, color: Colors.black, ), ), const SizedBox(height: 16), // Date Row( children: [ Icon( Icons.calendar_today, size: 20, color: Colors.grey[600], ), const SizedBox(width: 12), Text( '29.04.2023', style: TextStyle( fontSize: 16, color: Colors.black, ), ), ], ), const SizedBox(height: 12), // Lieu Row( children: [ Icon( Icons.location_on, size: 20, color: Colors.grey[600], ), const SizedBox(width: 12), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( 'Anim-Halle', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w500, color: Colors.black, ), ), Text( 'En Bas-les-Barres 6', style: TextStyle( fontSize: 14, color: Colors.grey[600], ), ), Text( '2316 Les Ponts-de-martel', style: TextStyle( fontSize: 14, color: Colors.grey[600], ), ), ], ), ], ), const SizedBox(height: 12), // Organisation Row( children: [ Container( width: 20, height: 20, child: Icon( Icons.groups, size: 20, color: Colors.grey[600], ), ), const SizedBox(width: 12), Text( 'L\'Octonelle', style: TextStyle( fontSize: 16, color: Colors.black, ), ), ], ), ], ), ), ], ), ); } @override EventDetailsViewModel viewModelBuilder( BuildContext context, ) => EventDetailsViewModel(); }